specify types in method calls
Mark McEahern
mark at mceahern.com
Sun Feb 1 10:27:01 EST 2004
More information about the Python-list mailing list
Sun Feb 1 10:27:01 EST 2004
- Previous message (by thread): specify types in method calls
- Next message (by thread): advice on programming style: is multiple inheritance bad?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Uwe Mayer wrote: >Hi, > >sometimes I'd like to be able to specify that a parameter to a method call >should be of a specific instance. I can do that using the isinstance() >buildin in the body of the method. > The Pythonic way seems to prefer a polymorphic approach; that is, rather than focus on what type things are, the real question is whether they behave in an expected way. Here's a reference to PyProtocols and PEP 246: http://peak.telecommunity.com/PyProtocols.html // m
- Previous message (by thread): specify types in method calls
- Next message (by thread): advice on programming style: is multiple inheritance bad?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list