Re: [Django] #28893: Narrow dict.items() calls to .keys()/.items()

2017-12-06 Thread Django
#28893: Narrow dict.items() calls to .keys()/.items()
--+
 Reporter:  Дилян Палаузов|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by GitHub ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"a862af383969ade774f6b0fa1d331bc87b188b89" a862af38]:
 {{{
 #!CommitTicketReference repository=""
 revision="a862af383969ade774f6b0fa1d331bc87b188b89"
 Fixed #28893 -- Removed unnecessary dict.items() calls.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.fb6ceec23b2b85054a9faa5bd190a0d2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28893: Narrow dict.items() calls to .keys()/.items()

2017-12-06 Thread Django
#28893: Narrow dict.items() calls to .keys()/.items()
--+
 Reporter:  Дилян Палаузов|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * needs_better_patch:  1 => 0


Comment:

 [https://github.com/django/django/pull/9437 PR]

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.4160fec03bf34fee116f94bc1d9d4b26%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28893: Narrow dict.items() calls to .keys()/.items()

2017-12-06 Thread Django
#28893: Narrow dict.items() calls to .keys()/.items()
--+
 Reporter:  Дилян Палаузов|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Sergey Fedoseev):

 Replying to [comment:3 Дилян Палаузов]:
 > I know that iterating over a {{{dict:}}} and {{{dict.keys():}}} is
 effectively the same, but while the later returns (an iterator of) a view,
 I don't know what the former returns and therefore whether both forms are
 really equivalent.

 {{{
 In [2]: iter({})
 Out[2]: 

 In [3]: iter({}.keys())
 Out[3]: 
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.29c518ef5c92c228c0e7f70ae041e491%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28893: Narrow dict.items() calls to .keys()/.items()

2017-12-06 Thread Django
#28893: Narrow dict.items() calls to .keys()/.items()
--+
 Reporter:  Дилян Палаузов|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Дилян Палаузов):

 Yes, it is better not to apply the last snippet in debug.py.

 I know that iterating over a {{{dict:}}} and {{{dict.keys():}}} is
 effectively the same, but while the later returns (an iterator of) a view,
 I don't know what the former returns and therefore whether both forms are
 really equivalent.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.b9abfc9817be31e243ff190923d74d4d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28893: Narrow dict.items() calls to .keys()/.items()

2017-12-05 Thread Django
#28893: Narrow dict.items() calls to .keys()/.items()
--+
 Reporter:  Дилян Палаузов|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Sergey Fedoseev):

 * cc: Sergey Fedoseev (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.cbf66b66416dcf87f23db262fa00bbac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28893: Narrow dict.items() calls to .keys()/.items()

2017-12-05 Thread Django
#28893: Narrow dict.items() calls to .keys()/.items()
--+
 Reporter:  Дилян Палаузов|Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Core (Other)  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Tim Graham):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1
 * component:  Uncategorized => Core (Other)
 * stage:  Unreviewed => Accepted


Comment:

 `keys()` is generally unneeded. Something like `for name in
 tb_frame.f_locals` does an implicit keys; see
 21046e77734278cea871dce90bf29aa5b7b4. I guess you didn't test the
 patch as there's at least one mistake in `debug.py` that broke things.

 By the way, is there something preventing you from submitting patches on
 GitHub? If it's only the knowledge of how to to do, we have
 [https://docs.djangoproject.com/en/dev/intro/contributing/#committing-the-
 changes-in-the-patch a tutorial].

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.ee4c33db37af8eefee1291fe0a9addf2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28893: Narrow dict.items() calls to .keys()/.items()

2017-12-05 Thread Django
#28893: Narrow dict.items() calls to .keys()/.items()
-+-
 Reporter:  Дилян Палаузов   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Uncategorized|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Дилян Палаузов):

 * Attachment "narrow.patch" added.


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.02130a6c9db8a8d5835fa96474e678a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #28893: Narrow dict.items() calls to .keys()/.items()

2017-12-05 Thread Django
#28893: Narrow dict.items() calls to .keys()/.items()
+
   Reporter:  Дилян Палаузов|  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  Uncategorized |Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/057.4e2d6a7d29579dbf7e87621c605418b6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.