Re: internal circular class references

2008-12-11 Thread Ethan Furman
Carl Banks wrote: On Dec 10, 5:26 pm, Ethan Furman [EMAIL PROTECTED] wrote: Greetings List! I'm writing a wrapper to the datetime.date module to support having no date. Its intended use is to hold a date value from a dbf file, which can be empty. The class is functional at this point, but

Re: internal circular class references

2008-12-11 Thread Carl Banks
On Dec 11, 11:33 am, Ethan Furman et...@stoneleaf.us wrote: Good question.  My goal with NullDate is to have a date object that I can treat the same regardless of whether or not it actually holds a date.  NullDates with no value should sort before any NullDates with a value, should be

Re: internal circular class references

2008-12-11 Thread rdmurray
On Thu, 11 Dec 2008 at 09:33, Ethan Furman wrote: Carl Banks wrote: On Dec 10, 5:26 pm, Ethan Furman et...@stoneleaf.us wrote: First of all, do you even need to wrap the datetime.date class? With Python's duck typing ability, you could have a separate NullDate class to go alongside the

Re: internal circular class references

2008-12-11 Thread Ethan Furman
Thanks, Carl! Thanks, RDM! Your examples and ideas are much appreciated. Many thanks also to everyone else who responded. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

internal circular class references

2008-12-10 Thread Ethan Furman
Greetings List! I'm writing a wrapper to the datetime.date module to support having no date. Its intended use is to hold a date value from a dbf file, which can be empty. The class is functional at this point, but there is one thing I would like to change -- datetime.date.max and

Re: internal circular class references

2008-12-10 Thread James Stroud
Ethan Furman wrote: Greetings List! I'm writing a wrapper to the datetime.date module to support having no date. Its intended use is to hold a date value from a dbf file, which can be empty. The class is functional at this point, but there is one thing I would like to change --

Re: internal circular class references

2008-12-10 Thread Terry Reedy
James Stroud wrote: I resisted posting a similar question recently. After much consideration, I realized that the inability to reference a class inside its own definition must have been a deliberate design of the language. The class *does not exist* to be referenced from inside its body

Re: internal circular class references

2008-12-10 Thread Carl Banks
On Dec 10, 5:26 pm, Ethan Furman [EMAIL PROTECTED] wrote: Greetings List! I'm writing a wrapper to the datetime.date module to support having no date.  Its intended use is to hold a date value from a dbf file, which can be empty. The class is functional at this point, but there is one thing

Re: internal circular class references

2008-12-10 Thread Carl Banks
On Dec 10, 8:18 pm, James Stroud [EMAIL PROTECTED] wrote: Ethan Furman wrote: Greetings List! I'm writing a wrapper to the datetime.date module to support having no date.  Its intended use is to hold a date value from a dbf file, which can be empty. The class is functional at this