I have to say up front that I'm somewhat shocked at how quickly this thread
has exploded!  Since I'm sprinting this week, I haven't thoroughly read every
message and won't have time tonight to answer every question, but I'll try to
pick out some common ideas.  I really appreciate everyone's input and will try
to clarify the PEP where I can.

It is probably not clear enough from the PEP, but I actually don't expect that
most individual Python developers will use this feature.  This is why the -R
flag exists and the behavior is turned off by default.  When I'm developing
some Python code in my home directory, I usually only use one Python version
and even if I'm going to test it with multiple Python versions, I won't need
to do this *simultaneously*.  I will generally blow away all build artifacts
(including, but not limited to .pyc files) and then rebuild with the different
Python version.

I think that this feature will be limited mostly to distros, which have
different use cases than individual developers.  But these are important use
cases for Python to support nonetheless.

My rationale for choosing the file system layout in the PEP was to try to
present something more familiar to today's Python and to avoid radical
reorganization of the way Python caches its byte code.  Thus having a sibling
directory that differs from the source just by extension seemed more natural
to me.

Encoding the magic number in the file name under .pyr would I thought make the
look up scheme more efficient since the import machinery can craft the file
name directly.  I agree it's not very human friendly because nobody really
knows which magic numbers are associated with which Python versions and flags.

As to the question of sibling directories or folder-per-folder I think
performance issues should be the deciding factor.  There are file system
limitations to consider (but also a wide variety of file systems in use).  Do
the number of stat calls predominate the performance costs?  Maybe it makes
sense to implement the two different approaches and do some measurements.

-Barry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to