Hi Adam,
(reordering quoted parts a little)
On Tuesday 19 November 2013 18:33:01 Adam Smith wrote:
> Hi, I'm quite new to Python and Django
Welcome aboard!
> Like I said, I'm quite new to Python and this community, I'm not sure
> whether this is the right place to ask this kind of question.
>
This list is intended for discussing the development of Django, so questions
about its implementation are exactly on topic.
> as I read through the django/utils/functional.py, I was wondering why not
> use `classmethod` as a class method decorator consistently, as line
> 334? Any specific reasons?
>
I assume you're referring to the places like line 122 (which you linked to)
and line 140, where instead of
@classmethod
def x(cls,...):
...
you see
def x(cls,...):
...
x = classmethod(x)
The reason for this is historic: Decorators were only introduced into Python
at version 2.4, and Django<1.2 still supported Python 2.3. Some code hasn't
changed since then. Now that you pointed it out, these specific lines are
likely to change soon :)
Thanks,
Shai.
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/173119684.RxPl0gn4eY%40deblack.
For more options, visit https://groups.google.com/groups/opt_out.