python:index
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
python:index [2014/07/19 22:02] – tkbletsc | python:index [2014/07/19 22:04] – tkbletsc | ||
---|---|---|---|
Line 122: | Line 122: | ||
< | < | ||
def recognize_type(v): | def recognize_type(v): | ||
- | | + | |
- | return int(v) | + | except ValueError: pass |
- | | + | |
- | | + | try: return int(v) |
+ | | ||
+ | |||
return v | return v | ||
| |
python/index.txt · Last modified: 2014/07/20 17:48 by tkbletsc