Do I always have to write "self." ?

Samuel A. Falvo II kc5tja at garnet.armored.net
Wed May 3 15:53:17 EDT 2000


In article <B5353272.5A85%abrahams at mediaone.net>, Dave Abrahams wrote:
>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.

I don't have any formal education in computer science -- everything I know
about programming I learned by doing myself on my own time.  To be honest,
I'm not so sure I want to persue such a formal education; it sounds like it
confines the imagination much too much for my tastes.

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

I use context here in the same manner you used it in your reply to me
("context of computer science"), as more or less a 'scope'.  Within the
PrintName() method, 'name' can only be one type of object -- a string,
because that's the only way it's used. 'name' is applicable *only* to
PrintName() because that's the formal argument to PrintName().

In more formal computer science terms, I, the reader of the source code, can
perform a type inference that 'name' is a string, because name is used where
a string is expected, and nowhere else.

--
KC5TJA/6, DM13, QRP-L #1447
Samuel A. Falvo II
Oceanside, CA



More information about the Python-list mailing list