thank you so much. On Feb 7, 8:58 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Tuesday, 7 February 2012 11:36:04 UTC, newme wrote: > > > thank you. > > then a basic python question. > > how does queryset implement it? > > does python also allow operator (e.g. []) overloading? > > It's not usually called overloading in Python, but yes. Classes can define > a `__getitem__` method which determines what to do when the square-bracket > notation is used. You can see the code > here:https://code.djangoproject.com/browser/django/trunk/django/db/models/... > -- > DR.
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.