PyWarts: time, datetime, and calendar modules

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Jan 15 02:00:49 EST 2012


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... at 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 holding an instance is an instance variable. A
>> variable holding a class is a class variable.
> 
> You went to a lot of trouble to prove nothing. Here allow me to retort:
> 
> A box holding an apple is an apple box. A box holding a pear is a pear
> box.
> A box holding an orange is a orange box. A box holding an banana is an
> banana box. And a box that penis comes in is a vagina!

Penises aren't supplied in boxes. About 50% of the population already has 
one, the other 50% can get as many as they want.


>> Guessing is for fourth-class programmers who don't know their language
>> and are too lazy to RTFM.
> 
> Oh really. I don't know about you Steven but i am not JUST a Python
> programmer. I write tons of code with Python but i also write tons of
> code in many other languages too.

Why don't you approach those other languages and demand that they change 
to match Python's model then? See how well that goes over.


>> At worst, we might agree that the datetime API is old and tired, and
>> that if descriptors existed back in Python 1.x then datetime.weekday
>> could have been a computed property instead of a method, but alas we've
>> lost the opportunity for this. Any changes to datetime need to be
>> backward compatible.
> 
> Why? "print()" is not backward compatible? 

You missed your opportunity by two versions. The time to have made the 
change was before Python 3.0 came out. We're now up to 3.2 and 3.3 is 
under development. The opportunity for breaking backward compatibility 
was 3-4 years ago. Now we're back to the normal paradigm of caring about 
backward compatibility.  


> Face it, Guido has broken Python's cherry. She is no longer pure.

You need to get yourself a girlfriend. Or at least a subscription to 
Playboy.



-- 
Steven



More information about the Python-list mailing list