Adding static typing to Python

brueckd at tbye.com brueckd at tbye.com
Tue Feb 19 23:08:05 CET 2002


On Tue, 19 Feb 2002, Quinn Dunkan wrote:

> > An even better approach is to ask yourself: if it's a person's ID, then
> > why isn't the variable named personID?
>
> I didn't say that because the OP could have objected that "then you're just
> encoding the type information in the variable name".

No, that would be encoding more information about what it is - a person
object vs. a person's ID. It still might be a string, an integer, etc.
Encoding the type info in the variable name would be something along the
Hungarianish lines of "iPersonID".

-Dave





More information about the Python-list mailing list