Tuesday, April 17, 2018

Re: Possibly a bug in BaseContext

There is also something strange here:

https://github.com/django/django/blob/master/django/template/context.py#L229

That line "self.update({})" doesnt do nothing. The inherited "update" method from Context class doesnt do nothing extra.

The same here:
https://github.com/django/django/blob/master/django/template/context.py#L233

On Wednesday, April 18, 2018 at 1:14:24 AM UTC+2, python2and...@gmail.com wrote:

Maybe this is a bug.


It doesnt make sense this line:

  https://github.com/django/django/blob/master/django/template/context.py#L48


Its creating a ContextDict:

  ContextDict(self, *dicts, **kwargs)


ContextDict inherits directly from dict.  A dictionary only allows one argument. Not more than one argument.


I am not sure whether this "push" method is used in some other place of Django code.


Best regards,

Miguel.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c4d2f272-23cd-42a2-9896-b05576603a91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment