Do I always have to write "self." ?

Dave Abrahams abrahams at mediaone.net
Wed May 3 01:33:37 EDT 2000


in article slrn8guafv.pf0.kc5tja at garnet.armored.net, Samuel A. Falvo II at
kc5tja at garnet.armored.net wrote on 5/2/00 7:25 AM:

> 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."

Musta missed that one. In the context of computer science, "type" has a very
specific meaning. It's no wonder a few of us are confused by your usage.

>> 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.

SHOUTING the same thing over again may be blunt, but it doesn't make it any
clearer. I can only guess that you must mean something unusual by 'in the
context of'...
 
>> 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.

Of course I knew that. The unit cancellation just isn't apparent to me.

>> 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.

Oops! I must have forgotten the smiley ;)

-Dave

P.S. hungarian-or-not is a religious issue. I only enjoy debating it for
short periods to test my resolve ;) I think it may make more sense in Python
than it does in statically typed languages, but in any case I respectfully
bow out now.
 




More information about the Python-list mailing list