Skip to content

Commit

Permalink
reformatted code; updated news
Browse files Browse the repository at this point in the history
  • Loading branch information
blhsing committed Jul 12, 2024
1 parent 97b813d commit 6ea65b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Include/pymacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@

// Test if dict_or_mapping is a dict, and call dict_func if it is, or call
// mapping_func if not. Store the returning value in result.
#define _Py_DICT_OR_MAPPING(dict_or_mapping, result, \
dict_func, mapping_func, ...) \
#define _Py_DICT_OR_MAPPING(dict_or_mapping, result, dict_func, mapping_func, \
...) \
if (PyDict_Check(dict_or_mapping)) { \
result = dict_func(dict_or_mapping, ##__VA_ARGS__); \
} \
Expand All @@ -204,8 +204,8 @@
// Test if dict_or_mapping is a dict, and call dict_func if it is, or call
// mapping_func if dict_or_mapping is a mapping; otherwise execute else_block.
// Store the returning value in result.
#define _Py_DICT_OR_MAPPING_ELSE(dict_or_mapping, result, \
dict_func, mapping_func, else_block, ...) \
#define _Py_DICT_OR_MAPPING_ELSE(dict_or_mapping, result, dict_func, \
mapping_func, else_block, ...) \
if (PyDict_Check(dict_or_mapping)) { \
result = dict_func(dict_or_mapping, ##__VA_ARGS__); \
} \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Allow a mapping to be passed as the *globals* argument for the built-in functions :func:`exec` and :func:`eval`.
Allow a mapping to be the `__dict__` attribute of any object. This allows a mapping to be the global namespace of a module. It also allows a mapping to be passed as the *globals* argument for the built-in functions :func:`exec` and :func:`eval`.
Patch by Ben Hsing

0 comments on commit 6ea65b9

Please sign in to comment.