Changes between Version 33 and Version 34 of DeveloperGuidelines/Py_2_3


Ignore:
Timestamp:
07/02/19 12:04:21 (5 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Py_2_3

    v33 v34  
    133133The same applies to {{{dict.iterkeys()}}} (use {{{dict.keys()}}} instead) and {{{dict.itervalues()}}} (use {{{dict.values()}}} instead).
    134134
     135=== No dict.has_key ===
     136
     137The {{{dict.has_key()}}} method has been removed in Python-3 in favor of the {{{x in y}}} pattern, which is also available (and equivalent) in Python-2.7:
     138
     139{{{#!python
     140# Deprecated:
     141if d.has_key(k):
     142# New Standard:
     143if k in d:
     144}}}
    135145=== Map and Zip return generators ===
    136146