| 64:1c0884f5506e | 65:f2dc17b830e0 |
|---|---|
| 1 #!/usr/bin/env python3 | |
| 2 ''' | |
| 3 Classes for formally storing LDraw objects | |
| 4 ''' | |
| 5 | |
| 1 def ldraw_str(value): | 6 def ldraw_str(value): |
| 2 ' Like str() except removes unneeded ".0"-suffixes ' | 7 ' Like str() except removes unneeded ".0"-suffixes ' |
| 3 rep = str(value) | 8 rep = str(value) |
| 4 if isinstance(value, float): | 9 if isinstance(value, float): |
| 5 if rep.endswith('.0'): | 10 if rep.endswith('.0'): |