function "overloading"
Janos Blazi
jblazi at netsurf.de
Fri Jan 21 13:18:36 EST 2000
More information about the Python-list mailing list
Fri Jan 21 13:18:36 EST 2000
- Previous message (by thread): Your site has been included on OpenHere
- Next message (by thread): function "overloading"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This was not exctly what I meant. These classes are not subclasses of each other. What I mean is: I have essentially the same function from the mathematical point of you (intersection) and I have to call it with different arguments. Of course I could code the type information into the classes, so during runtime intersection could find out whith which types of arguments it has been called, but maybe there are more elegant possibilities. Janos Blazi Gerrit Holl <gerrit.holl at pobox.com> schrieb in im Newsbeitrag: 20000121173150.A1498 at stopcontact.palga.uucp... > Janos Blazi wrote on 948468281: > > I have 3 classes called Tline, Tsegment and Tpoint, repectively. I'd like to > > write a function "subset" that cheks if one of the instances of the above > > classes is a subset of another instance (as long as this is sensible). > > > > I am afraid I cannot overload the name "subset" and additionally when subset > > has control it cannot decide the type of its arguments: Does this mean I > > have to write several *different* subset functions having different names? > > >>> print issubclass.__doc__ > issubclass(C, B) -> Boolean > > Return whether class C is a subclass (i.e., a derived class) of class B. > > regards, > Gerrit. > > -- > Please correct any bad English you encounter in my email message! > -----BEGIN GEEK CODE BLOCK----- http://www.geekcode.com > Version: 3.12 > GCS dpu s-:-- a14 C++++>$ UL++ P--- L+++ E--- W++ N o? K? w--- !O !M !V PS+ PE? > Y? PGP-- t- 5? X? R- tv- b+(++) DI D+ G++ !e !r !y > -----END GEEK CODE BLOCK----- > -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==---------- http://www.newsfeeds.com The Largest Usenet Servers in the World! ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
- Previous message (by thread): Your site has been included on OpenHere
- Next message (by thread): function "overloading"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list