>
>
> Statics are still hidden global state, and those can be problematic
> regardless of being function local or module global. Having global state
> like this affects testability and can affect threading as well.
>

I think this is a very good point. I'm no expert, but I know a HUGE amount
of old C code isn't thread-safe -- and static has something to do with that?

Not that people shouldn't be allowed to write non thread-safe code in
Python, but it shouldn't be encouraged. An awful lot of code is written
with no idea that it will be run in multi-threaded code later on.

Personally, I can't think of any times when I would have used this -- maybe
because it wasn't there, so I didn't think about it.

 -CHB

-- 
Christopher Barker, PhD (Chris)

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/SPJW2VTP33IFKGXSKQFTP4WJLPUX6Z6F/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to