Re: OT[1]: Re: SV: Polymorphism using constructors

2008-03-05 Thread Jeff Schwab
Dennis Lee Bieber wrote: > On Wed, 05 Mar 2008 08:26:04 -0800, Jeff Schwab <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Which is which? Aren't those both part of the space vehicle? Btw, do >> you work for government or industry? Do you enjoy working with the >> spa

OT[1]: Re: SV: Polymorphism using constructors

2008-03-05 Thread Jeff Schwab
Dennis Lee Bieber wrote: > On Tue, 4 Mar 2008 20:06:38 -0500, Tommy Grav <[EMAIL PROTECTED]> declaimed > the following in comp.lang.python: > >> SV = "Svar" is the Norwegian word for Reply. >> > Ah, good... In my working life, "SV" => "Space Vehicle", often used > to differentiate between th

SV: SV: Polymorphism using constructors

2008-03-04 Thread K Viltersten
> What does "SV" in the subject mean? Probably, it's an abbreviation of "svar", which means "reply". -- Regards Konrad Viltersten sleep- a substitute for coffee for the poor ambition - lack of sense to be lazy -- http://mail.python.org/mailman/listinfo/pyt

Re: SV: Polymorphism using constructors

2008-03-04 Thread Jeff Schwab
Tommy Grav wrote: > > On Mar 4, 2008, at 4:53 PM, Jeff Schwab wrote: > >> What does "SV" in the subject mean? > > SV = "Svar" is the Norwegian word for Reply. Thanks. Serves me right for not speaking Norwegian. -- http://mail.python.org/mailman/listinfo/python-list

Re: Polymorphism using constructors

2008-03-04 Thread castironpi
On Mar 4, 7:06 pm, Tommy Grav <[EMAIL PROTECTED]> wrote: > On Mar 4, 2008, at 4:53 PM, Jeff Schwab wrote: > > > What does "SV" in the subject mean? > > SV = "Svar" is the Norwegian word for Reply. > > Cheers >    Tommy It is also the name of my lockermate in grade school. "So, Svar, how 'bout the

Re: SV: Polymorphism using constructors

2008-03-04 Thread Tommy Grav
On Mar 4, 2008, at 4:53 PM, Jeff Schwab wrote: > What does "SV" in the subject mean? SV = "Svar" is the Norwegian word for Reply. Cheers Tommy -- http://mail.python.org/mailman/listinfo/python-list

Re: SV: Polymorphism using constructors

2008-03-04 Thread Jeff Schwab
What does "SV" in the subject mean? -- http://mail.python.org/mailman/listinfo/python-list

SV: Polymorphism using constructors

2008-03-04 Thread K Viltersten
"Diez B. Roggisch" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] >K Viltersten schrieb: >> I'm writing a class for rational numbers >> and besides the most obvious constructor >> >> def __init__ (self, nomin, denom): >> >> i also wish to have two supporting ones >> >> def __init

SV: Polymorphism using constructors

2008-03-04 Thread K Viltersten
"Carl Banks" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > On Mar 3, 4:17 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >> Since Python doesn't support having two methods with the same name, >> the usual solution is to provide alternative constructors using >> classmethod():

Re: Polymorphism using constructors

2008-03-03 Thread castironpi
On Mar 3, 4:03 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Mar 3, 4:17 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > > Since Python doesn't support having two methods with the same name, > > the usual solution is to provide alternative constructors using > > classmethod(): > > >   @classm

Re: Polymorphism using constructors

2008-03-03 Thread Carl Banks
On Mar 3, 4:17 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > Since Python doesn't support having two methods with the same name, > the usual solution is to provide alternative constructors using > classmethod(): > > @classmethod > def from_decimal(cls, d) > sign, digits, exp = d.as

Re: Polymorphism using constructors

2008-03-03 Thread Raymond Hettinger
On Mar 3, 12:21 pm, "K Viltersten" <[EMAIL PROTECTED]> wrote: > I'm writing a class for rational numbers > and besides the most obvious constructor > > def __init__ (self, nomin, denom): > > i also wish to have two supporting ones > > def __init__ (self, integ): > self.__init__ (integ, 1) >

Re: Polymorphism using constructors

2008-03-03 Thread Diez B. Roggisch
K Viltersten schrieb: > I'm writing a class for rational numbers > and besides the most obvious constructor > > def __init__ (self, nomin, denom): > > i also wish to have two supporting ones > > def __init__ (self, integ): >self.__init__ (integ, 1) > def __init__ (self): >self.__init_

Polymorphism using constructors

2008-03-03 Thread K Viltersten
I'm writing a class for rational numbers and besides the most obvious constructor def __init__ (self, nomin, denom): i also wish to have two supporting ones def __init__ (self, integ): self.__init__ (integ, 1) def __init__ (self): self.__init__ (0, 1) but for some reason (not know