User talk:Hout: Difference between revisions

(Python itself is not Pythonic (that failed to get through the PEP processes), but set comprehensions are excellent.)
Line 234:
::The style you use must be acceptable as it is the method used in Python 1.6 'reduce(lambda x, y: x+y, range(1,101))' was then the way to sum a range. Comprehension was introduced in python2 so perhaps you could mark your examples requires python1.6 and paddy could mark his requires python2.<br>
::Some imperative languages eschew Break and Continue. Plaese, please, no seriously please tell me that [[Sexy_primes#Imperative_.28iffy_.26_loopy.29_Style]] isn't Pythonic--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 13:56, 28 October 2018 (UTC)
 
::: Indeed, in fact Python itself is not Pythonic – it contains (and many actively use) reduce, map and filter. There was a move from the BDFL to reduce Python to the Pythonic dialect, but the PEP processes rejected it.
::: Set comprehensions are exactly the kind of thing that we need – both practical and mathematically well-founded enough to inspire complete confidence. In the word-break example (and sometimes elsewhere) I have shown the unsugared underlying list monad version, non just because it can be interesting or more flexible to understand what's going on under the hood or bonnet, but also because my experience has been that the insight helps my intuition in using even the sugared version (in Python, Haskell or elsewhere) more fluently. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 14:11, 28 October 2018 (UTC)
 
::: Set comprehensions are exactly the kind of thing that we need – both practical and mathematically well-founded enough to inspire complete confidence, as well as powerful and elegant. In the word-break example (and sometimes elsewhere) I have shown the unsugared underlying list monad version, nonnot just because it can be interesting or more flexible to understand what's going on under the hood or bonnet, but also because my experience has been that the insight helps my intuition in using even the sugared version (in Python, Haskell or elsewhere) more fluently, and with more clarity. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 14:11, 28 October 2018 (UTC)
9,655

edits