Re: [Tutor] question about object oriented programming and inheritance using datetime module

2007-01-16 Thread Kent Johnson
Terry Carroll wrote: > An example is if you wanted to create a "birthdate" class, which was just > like a regular date, but also included the birthstone that corresponded to > the date. We could create a "birthdate" module that included a > "Birthdate" class: > > ### > > import da

Re: [Tutor] question about object oriented programming and inheritance using datetime module

2007-01-16 Thread Terry Carroll
On Mon, 15 Jan 2007, Kent Johnson wrote: > [EMAIL PROTECTED] wrote: > > > My class inherits from the date class, but I > > have to type 'from datetime import date' before I can initialize the > > class definition. Is there some way to avoid this ? > > No, and really there is no reason to wan

Re: [Tutor] question about object oriented programming and inheritance using datetime module

2007-01-15 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > hey guys, I've been experimenting with Python's datetime module, and I > created a function that, given a person's birthdate, calculates how old > that person is. Now I want to create a class called age_calculator that > does much the same thing. Why? You have a pe

Re: [Tutor] question about object oriented programming and inheritance using datetime module

2007-01-15 Thread Luke Paireepinart
[EMAIL PROTECTED] wrote: > hey guys, I've been experimenting with Python's datetime module, and I > created a function that, given a person's birthdate, calculates how > old that person is. Now I want to create a class called > age_calculator that does much the same thing. My class inherits fr

[Tutor] question about object oriented programming and inheritance using datetime module

2007-01-15 Thread tpc
hey guys, I've been experimenting with Python's datetime module, and I created a function that, given a person's birthdate, calculates how old that person is. Now I want to create a class called age_calculator that does much the same thing. My class inherits from the date class, but I have to ty