Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
8e346de8
Commit
8e346de8
authored
Jun 22, 2015
by
Jason Swails
Browse files
Fix Python 3 support in unit package.
parent
96f0c0f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
wrappers/python/simtk/unit/quantity.py
wrappers/python/simtk/unit/quantity.py
+3
-0
No files found.
wrappers/python/simtk/unit/quantity.py
View file @
8e346de8
...
...
@@ -77,6 +77,7 @@ import math
import
copy
from
.standard_dimensions
import
*
from
.unit
import
Unit
,
is_unit
,
dimensionless
import
sys
class
Quantity
(
object
):
"""Physical quantity, such as 1.3 meters per second.
...
...
@@ -818,6 +819,8 @@ def _is_string(x):
except
StopIteration
:
return
False
if
sys
.
version_info
>=
(
3
,):
del
Quantity
.
__nonzero__
# run module directly for testing
if
__name__
==
'__main__'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment