Coding standard: Prefixing variables to indicate datatype

F. GEIGER fgeiger at
Fri Jan 17 08:30:11 CET 2003

Never do this! Such conventions prevent you from writing OO software.

Example: Why should a name be a string? A name is a class Name. It has to
have an interface, not a type. If it is meant to be used in a string
context, it has to provide a string operator. It's all about behavior, not
about type.


"Thomas Weholt" <2002 at> schrieb im Newsbeitrag
news:0BuV9.11459$CG6.203654 at
> In my day-job I use Delphi/Object Pascal. My firm has a coding-standard
> where we prefix all variables with a single character to indicate
> strings are prefixed with s, integers with i, floats with f etc. etc.
> Are there any standards like this for Python? Or hints, tips, opinions
> related to this topic? I do believe it could make source more
> and easier to debug/maintain when used in larger projects.
> All thoughts appreciated.
> Best regards,
> Thomas

More information about the Python-list mailing list