xoutil.keywords
– Tools for manage Python keywords as names¶
Tools for manage Python keywords as names.
Reserved Python keywords can’t be used as attribute names, so this module functions use the convention of rename the name using an underscore as suffix when a reserved keyword is used as name.
-
xoutil.keywords.
getkwd
(obj, name, default=None)[source]¶ Like getattr but taking into account Python keywords.
-
xoutil.keywords.
org_kwd
(name)[source]¶ Remove the underscore suffix if name starts with a Python keyword.