On 03/02/2010 06:50, Barry Warsaw wrote:
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.

The fact that it doesn't affect most developers makes it the *perfect* opportunity to bikeshed... :-)

Michael

  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

_______________________________________________
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/fuzzyman%40voidspace.org.uk


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your 
employer, to release me from all obligations and waivers arising from any and all 
NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, 
confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS 
AGREEMENTS") that I have entered into with your employer, its partners, licensors, 
agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. 
You further represent that you have the authority to release me from any BOGUS AGREEMENTS 
on behalf of your employer.


_______________________________________________
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