User talk:Hout: Difference between revisions

Line 227:
 
:::Thanks ! The resources of Perl have found a way through many difficult moments for me (most memorably 4Gb of badly formed CSV files, in which commas sometimes delimited fields, and sometimes just expressed English pauses :-) Python too of course – 4 years later a single 4Gb file of (better formed) CSV was swiftly handled by the Python CSVReader. Fortunately, functional programming remains a well-embedded and well discussed part of Python use, and an unimpeded route to all the Python libraries :-) The community made sure of that ... [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 13:02, 28 October 2018 (UTC)
::import The Unwritten Rules of Python<br>
::1. You do not talk about the GIL.<br>
::2. You do NOT talk about the GIL.<br>
::3. Don't even mention the GIL. No seriously.<br>
::Unlike Perl6, Python uses Reference Counting (like Perl5) not Garbage Collection. Locking the refCount is a major problem when multithreading. Python overcomes this by having a global lock, which effectively means that only one thread can run at any one time. So Python can multithread but only for reasons other than speeding up CPU intensive tasks. If you try running a CPU intensive task across more than one thread it will run about half as fast as single core due to contention for the GIL. You are thus not going to achieve some of the advantage you think you will with functional code in Python<br>
::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)
2,172

edits