Is Python Dead?

Re: Is Python Dead?

Postby pydsigner » Thu Feb 18, 2016 3:56 am

micseydel wrote:I haven't worked with threading directly myself, so I don't have any comments on that. Same for You're welcome to elaborate (especially on the Java connection) if you wish.

Code: Select all
>>> import threading
>>> threading.__doc__
"Thread module emulating a subset of Java's threading model." is an OOP wrapper around threads. Instead of passing a function and arguments to thread.start_new_thread(), instances of threading.Thread() are created with the function and arguments passed to the constructor and then started by calling Thread.start(). There are some niceties thrown in, such as .join() which waits for the thread to finish execution, but nothing actually special. The real problem with the module is that the code is rotten to the core. Factory functions that literally do nothing but duplicate docstrings and obscure the actual __init__ signatures of the classes? No really.

As for, PEP 282 lists java.util.logging as one of its primary inspirations.

micseydel wrote:If Python started requiring a main() method of a class as the only means of writing Hello World then I'd get upset, or if a poor type system (I'm not a fan of Java's) was introduced that limited Python code (type hinting doesn't do this, even if today the type system isn't very sophisticated).

That's fair enough.
Laptop: Manjaro Linux, 32GB RAM, 512GB SSD, i7-6820HQ
Python: 2.7.12

For God sent not His Son into the world to condemn the world, but that the world through Him might be saved! (John 3:17)
User avatar
Posts: 34
Joined: Sat Feb 23, 2013 12:17 am
Location: Midwestern United States


Return to Bar

Who is online

Users browsing this forum: No registered users and 1 guest