Image

Imagegehn wrote in Imagepython_dev 😊thoughtful

Listens: The Jesus & Mary Chain - 'Sidewalking' [Barbed Wire Kisses]

Naming schemes?

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.