Spaces vs Tabs is my biggest pet-peeve. I usually set my editor to
use 4-spaces per indent and insert spaces for tabs. Occasionally, I
On May 5, 5:32 am, Duncan <
kupu...@googlemail.com> wrote:
> On May 5, 12:30 pm, Sylvain <
sylvain.viv...@gmail.com> wrote:> I'm a newbie to python and i've checked different codes (i.e.
> > users.py,...) with this :
>
> > def function_lower_case_with_underscores()
> > ....
> > ...
> > FunctionCapitalizedWords = function_lower_case_with_underscores
> > #<------- ???
>
> > We can find the same thing with classes.
> > I really wonder why it is usefull to assign the same function/class
> > with 2 different cases ?
>
> It isn't useful. My guess would be that whoever first wrote that code
> defined functions with names such as GetCurrentUser, but then someone
> else later came along and decided that the app engine should follow
> normal Python naming conventions (initial capitals are usually
> reserved for class names), so you'll find the documented function is
> get_current_user. They seem to have kept the other name for backwards
> compatibility, but you should use the documented form.
>