On 4/26/06, Thomas Wouters <[EMAIL PROTECTED]> wrote: > Of course, I only consider *my* reasons to be valid, and mine weren't > knee-jerk or tool-related. I don't think Python should be going "Oh, what > you wanted wasn't possible, but I think I know what you wanted, let me do it > for you", first of all because it's not very Pythonic, and second of all > because it doesn't lower the learning curve, it just delays some upward > motion a little (meaning the curve may become steeper, later.) A clear > warning, on the other hand, can be a helpful nudge towards the 'a-HA' > moment.
That still sounds like old-timer reasoning. Long ago we were very close to defining a package as "a directory" -- with none of this "must contain __init__.py or another *.py file" nonsense. IIRC the decision to make __init__.py mandatory faced opposition too, since people were already doing packages with just directories (which is quite clean and elegant, and that's also how it was in Java), but I added it after seeing a few newbies tear out their hair. I believe that if at that time __init__.py had remained optional, and today I had proposed to require it, the change would have been derided as unpythonic as well. There's nothing particularly unpythonic about optional behavior; e.g. classes may or may not provide an __init__ method. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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