Top.Mail.Ru
Python
? ?
LiveJournal for python.
View:Personal Journal.
View:Friends.
View:Calendar.
Missed some entries? Then simply jump to the previous day or the next day.

Wednesday, January 8th, 2003

Subject:Naming schemes?
Time:6:02 pm.
Mood:Image thoughtful.
Hi, all.. just found the community and thought i'd drop in. I'm a developer who uses python almost exclusively these days at work..

Here's something i was pondering earlier: python's naming scheme for built-in functions. It seems to be "all lowercase and no underscores, with abbreviations." So there's:

hasattr, setattr, getattr, etc. in __builtins__, and strings have endswith, expandtabs, isupper...

Why, then, would dictionary objects have a method called "has_key"?

I always took it for granted, but.. seems kinda out of place, doesn't it? Is "haskey" the name of someone Guido doesn't like? A swear in some language? Hmm.
Comments: Read 3 orAdd Your Own.

LiveJournal for python.

View:User Info.
View:Friends.
View:Calendar.
View:Memories.
Missed some entries? Then simply jump to the previous day or the next day.

Image