On 2017-05-29 16:08, Cameron Simpson wrote:

snip

BTW, in Python we tend to use named like "Fred" for classes (or
factories), and "fred" for regular variables. And "FRED" for things
that would be constants in other languages. Eg:

 MAX_THINGS = 16

 class Foo:
   ....

 def FooBah(x):
   return Foo(x, style="bah")

Yes, I've been aware of these conventions except for the last- I haven't knowingly used 'factories.' I assume from the context that factories return class instances so it makes sense to use the same conventions that apply to class names.

...and thanks again for explaining.

Alex

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to