mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Python] Explain some logic in get_types
This commit is contained in:
committed by
Bryan W. Weber
parent
9447dacc26
commit
1ab3e6a039
@@ -155,8 +155,12 @@ cdef get_types(item):
|
||||
itype = set()
|
||||
for i in item:
|
||||
if isinstance(i, dict):
|
||||
# Treat all classes derived from dict as equivalent, and
|
||||
# convertible to AnyMap
|
||||
itype.add(dict)
|
||||
elif isinstance(i, (list, tuple)):
|
||||
# Treat all classes derived from list or tuple as equivalent,
|
||||
# and convertible to std::vector
|
||||
itype.add(list)
|
||||
elif type(i) == bool:
|
||||
itype.add(bool) # otherwise bools will get counted as integers
|
||||
|
||||
Reference in New Issue
Block a user