Why aren't colons optional?
Roy Smith
roy at panix.com
Sun Jan 20 16:39:52 EST 2002
More information about the Python-list mailing list
Sun Jan 20 16:39:52 EST 2002
- Previous message (by thread): Why aren't colons optional?
- Next message (by thread): Why aren't colons optional?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alex Martelli <aleax at aleax.it> wrote: > No, it would have substantially impoverished the language: > > class doubleface: > def __getitem__(self, name): > return "anitem" > def __call__(self, *args): > return "acall" Can you give me a practical example of why somebody would want to define a __getitem__ method for a class?
- Previous message (by thread): Why aren't colons optional?
- Next message (by thread): Why aren't colons optional?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list