[Python-Dev] Another PEP 343 contextmanager glitch (original) (raw)
Phillip J. Eby pje at telecommunity.com
Sat Mar 25 05:38:07 CET 2006
- Previous message: [Python-Dev] Another PEP 343 contextmanager glitch
- Next message: [Python-Dev] Pickling problems are hard to debug
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 08:13 PM 3/24/2006 -0800, Guido van Rossum wrote:
I think that the code you added:
+ except: + if sys.excinfo()[1] is not value: + raise could use a comment explaining what's going on;
Done.
the difference between returning None and re-raising the exception is really quite subtle here, and only ever matters if something else besides the with-statement framework is calling exit. (I would add this distinction to the PEP too.)
Also done.
I'd like to see some discussion of your proposed change to .pth file processing; this could cause some surprises and will slow down all Python's start-up time due to the necessity to list every directory on sys.path. This is IMO a bad thing; there must be nothing to keep people from writing tiny scripts in Python, and slow startup time is an inhibitor there.
Okay, I'll cross that off then. Setuptools will just have to keep using its "install a special site.py on PYTHONPATH" trick to support PYTHONPATH installs.
(If you don't believe this could be a problem, try it with a long path containing several directories on NFS. This is the standard setup of Google developer workstations, and it gives one a different outlook on life.)
Ouch. All that computing power and you can't even copy files to your own machines? Tsk, tsk. ;)
- Previous message: [Python-Dev] Another PEP 343 contextmanager glitch
- Next message: [Python-Dev] Pickling problems are hard to debug
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]