Re: PyWarts: time, datetime, and calendar modules

2012-01-15 Thread Lie Ryan
On 01/15/2012 06:23 AM, Rick Johnson wrote: So how do we solve this dilemma you ask??? Well, we need to mark method OR variable names (OR both!) with syntactic markers so there will be NO confusion. Observe: def $method(self):pass self.@instanceveriable self.@@classvariable There is

Re: PyWarts: time, datetime, and calendar modules

2012-01-15 Thread Michael Torrie
On 01/14/2012 10:27 PM, Rick Johnson wrote: Face it, Guido has broken Python's cherry. She is no longer pure. You're acting like some over- protective father. WAKE UP! Python is a promiscuous little whore and she's on girls gone wild (Volume 4000) shaking her little money maker. We should at

PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
The interface for these modules is not intuitive. Instead of creating true OOP objects we have lists and strings. Any calendar object should expose string names of both: days of the week and months of the year. It seems one (or possibly more) of the three expose this important info however i

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Devin Jeanpierre
On Sat, Jan 14, 2012 at 1:54 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: The interface for these modules is not intuitive. Instead of creating true OOP objects we have lists and strings. Any calendar object should expose string names of both: days of the week and months of the year.

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 1:01 pm, Devin Jeanpierre jeanpierr...@gmail.com wrote: What's horrendous about the datetime module interface? Your listed complaints (OOP etc.) don't seem to have anything to do with it. Well my immediate complaint about date-time is actually a problem with the syntactic quandaries

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Devin Jeanpierre
On Sat, Jan 14, 2012 at 2:23 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: THAT PISSES ME OFF!!! :( We should never be forced to guess if a name is a callable or a variable! So how do we solve this dilemma you ask??? Well, we need to mark method OR variable names (OR both!) with

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 1:23 pm, Rick Johnson rantingrickjohn...@gmail.com wrote:   def $method(self):pass   self.@instanceveriable   self.@@classvariable Actually, class level methods can be accessed through ClassIdentifier.method, and instance methods through instanceidentifier.instancemethod. So

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Chris Angelico
On Sun, Jan 15, 2012 at 6:23 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: Observe:  def $method(self):pass  self.@instanceveriable  self.@@classvariable Are you deliberately inverting what PHP does, with $variablename? (Incidentally, that's one of the things that irks me about PHP -

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Evan Driscoll
On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: On Sat, Jan 14, 2012 at 2:23 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: THAT PISSES ME OFF!!!:( We should never be forced to guess if a name is a callable or a variable! So how do we solve this dilemma you ask??? Well, we need to mark

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 2:58 pm, Evan Driscoll edrisc...@wisc.edu wrote: On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: It also has some problems. For instance, if an object has a member which is a type that implements __call__ but is also useful to access on its own, is that a field or a function? Can

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Chris Angelico
On Sun, Jan 15, 2012 at 10:19 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: On Jan 14, 2:58 pm, Evan Driscoll edrisc...@wisc.edu wrote: On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: It also has some problems. For instance, if an object has a member which is a type that implements

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2012 10:54:57 -0800, Rick Johnson wrote: The interface for these modules is not intuitive. Instead of creating true OOP objects we have lists and strings. Lists and strings are true OOP objects. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2012 11:23:29 -0800, Rick Johnson wrote: On Jan 14, 1:01 pm, Devin Jeanpierre jeanpierr...@gmail.com wrote: What's horrendous about the datetime module interface? Your listed complaints (OOP etc.) don't seem to have anything to do with it. Well my immediate complaint about

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2012 14:58:26 -0600, Evan Driscoll wrote: On 01/14/2012 02:11 PM, Devin Jeanpierre wrote: On Sat, Jan 14, 2012 at 2:23 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: THAT PISSES ME OFF!!!:( We should never be forced to guess if a name is a callable or a variable! So

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Rick Johnson
On Jan 14, 10:23 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: This is not Java, and we prefer Python terminology. A variable holding an int is an int variable. A variable holding a string is a string variable. A variable holding a list is a list variable. A variable

Re: PyWarts: time, datetime, and calendar modules

2012-01-14 Thread Steven D'Aprano
On Sat, 14 Jan 2012 21:27:32 -0800, Rick Johnson wrote: On Jan 14, 10:23 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: This is not Java, and we prefer Python terminology. A variable holding an int is an int variable. A variable holding a string is a string variable. A