noob question
Chinook
chinook.nr at tds.net
Sun Jun 26 03:36:58 EDT 2005
On Sun, 26 Jun 2005 01:06:08 -0400, Matt Hollingsworth wrote
(in article <42BE37C0.3000306 at maudit.net>):
> Hello,
>
> Very new to python, so a noob question. When I've written stuff in
> JavaScript or MEL in the past, I've always adopted the variable naming
> convention of using a $ as the first character (no, I don't use perl,
> never have). Not possible in python. What are some good options that
> people commonly use so that they can easily and quickly identify
> variable with just a glance? When I was writing stuff in SoftImage
> XSI/JScript, many of the examples in the SDK used just a leading lower
> case o, but I'd like somethign that's more visible. I'm not a super
> advanced user and am just starting out in python (pretty much just
> working my way through Learning Python, at around page 160 or so).
> Seems like an _extremely_ elegent language that is very easy to read, so
> I suppose it's not really as much of an issue as it is with other
> languages. Still, I would like to see what other people do and what are
> some good ideas for this kind of thing.
>
> Thank you for any and all ideas.
>
> cheers,
>
> -Matt
>
>
Here is something I copied from somewhere (someone else might know the
source):
Summary of Naming Conventions
Type Convention
Example
-----------------------------------------------------------------------------
function action_with_underscores
find_all
variable noun_with_underscores
curr_index
constant NOUN_ALL_CAPS
ALLOWED_RNA_PAIRS
class MixedCaseNoun
RnaSequence
public property MixedCaseNoun
IsPaired
private property _noun_with_leading_underscore _is_updated
public method mixedCaseExceptFirstWordVerb stripDegenerate
private method _verb_with_leading_underscore _check_if_paired
really private
data __two_leading_underscores
__delegator_object_ref
parameters that
match
properties SameAsProperty def __init__(data,
Alphabet=None)
factory function MixedCase
InverseDict
module lowercase_with_underscores unit_test
Hope it does not come out too jumbled,
Lee C
More information about the Python-list
mailing list