Do I always have to write "self." ?
Samuel A. Falvo II
kc5tja at garnet.armored.net
Tue May 2 07:25:50 EDT 2000
In article <B533A0CB.592A%abrahams at mediaone.net>, Dave Abrahams wrote:
>type({}) is types.DictType
>type(UserDict()) is types.InstanceType
See my other post on the ambiguities of the word "type."
>It ain't obvious to me.
>>>> PrintName( Foo() )
>The name is ***
Allow me to re-iterate this, YET AGAIN:
def PrintName( name ):
print "The name is %s" % name
Now, IN THE CONTEXT OF PrintName, 'name' is *obviously* a string. So it
doesn't make sense to use Hungarian notation here.
This is *precisely* what I'd written in the previous article. I *cannot*
put it more bluntly than this.
>Still if your listOfListOfNames represents a way to map latitude and
>longitude to the names of cities, then "cityNames" or
>"mapCoordinateCityName" might be a better name for it.
Again, it all depends on the "type" of objects you're dealing with. If
you're dealing with sets of coordinates, then calling it a list of list of X
would be a little antithetical to the whole purpose of the notation, yes?
>> pArgument = argv[2];
>And where's the unit cancellation here?
char *argv[] defines argv as a vector of character pointers.
>I don't think you're being fair to mathematicians and physicists by trying
>to saddle them with responsibility for this nastiness.
Since YOU are the one with the notion that this is somehow "nasty," it is
YOU who are saddling them with the responsibility. *I* don't think
Hungarian is nasty -- I see it as a tool a programmer can use to keep things
straight in his head, and on paper, precisely as a Physicist would use units
to keep things straight in his/her head.
--
KC5TJA/6, DM13, QRP-L #1447
Samuel A. Falvo II
Oceanside, CA
More information about the Python-list
mailing list