Py2K wishes

William Tanksley wtanksle at hawking.armored.net
Tue Dec 28 17:06:38 EST 1999


On Tue, 28 Dec 1999 04:05:46 -0500, Paul Prescod wrote:
>William Tanksley wrote:

>> I don't agree directly -- I find "class This(That):" to be quite clear.

>In the same sense that "a or b" is clear? I.e. coming from another
>language you could read it directly?

No; in the sense that it's completely unambiguous.

>> In this case, minimal use of keywords is the focus.

>Why? Python has a lot of "extra" keywords like "and", "or", "is" "not".

Sure.  That's pythonic is a completely different sense.  There's more than
one w-- oops, I mean, Python is perfect.

Seriously, though, sometimes Python uses keywords and sometimes it
minimizes keyword use.  I think I can see the reason in this case: this
keyword would have only a single use, and would only appear in one place.
Its sole effect would be to expand the size of people's code.

>> >class Proxy:
>> >       def __init__ ( self, fallback ):
>> >               __fallback__=fallback

>> >a = Proxy( someObject )

>> >This would imply the following:

>> >class SomeClass( someParentClass ): pass
>> >assert SomeClass.__fallback__ == someParentClass
>> >assert SomeClass().__fallback__ == SomeClass.__fallback__

>> I don't have a clue what this is doing.  Sorry.

>It's doing what Python has always done with instances and their classes
>and base classes. Only now it is doing it based on a more explicit,
>generalized, reusable mechanism.

This doesn't even begin to help me.

I'm clearly going to have to wildly guess on my own.  Would that be
equivalent to setting __base__ now?

> Paul Prescod

-- 
-William "Billy" Tanksley, in hoc signo hack



More information about the Python-list mailing list