Message52305
The proposed patch handles ** arguments similar to the way * arguments are treated. If the expression following ** evaluates to an object that is not a dictionary, the new code attempts to update a new dictionary with that object. This procedure is closely similar to what PySequence_Tuple does with * arguments. (Python API does not provide PyMapping_Dict.) If new dictionary is succesfully created and updated, it replaces the original ** argument. If that attempt fails because kwdict is not a mapping (does not have a 'keys' attribute, a type error is raised explaining that a mapping is expected. All other errors, e.g. MemoryError are percolated up.
(I am am removing the previous versions of the patch.)
File Added: star-star-mapping.patch |
|
Date |
User |
Action |
Args |
2007-08-23 15:57:46 | admin | link | issue1686487 messages |
2007-08-23 15:57:46 | admin | create | |
|