Coding standard: Prefixing variables to indicate datatype
fgeiger at datec.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
"Thomas Weholt" <2002 at weholt.org> schrieb im Newsbeitrag
news:0BuV9.11459$CG6.203654 at news4.e.nsc.no...
> 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,
More information about the Python-list