Coding standard: Prefixing variables to indicate datatype
Manuel M. Garcia
mgarcia at cole-switches.com
Thu Jan 16 14:08:07 EST 2003
On Thu, 16 Jan 2003 10:04:55 +0100, "Thomas Weholt" <2002 at weholt.org>
wrote:
>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 datatype;
>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 understandable
>and easier to debug/maintain when used in larger projects.
>
>All thoughts appreciated.
>
>Best regards,
>Thomas
>
Read Guido's Pep#8, Style Guide for Python Code
http://www.python.org/peps/pep-0008.html
I agree with the other posters, Hungarian notation is much less useful
in Python than in other languages. If the code is strongly object
oriented, it may also be redundant.
Manuel
More information about the Python-list
mailing list