joe-greenawalt / skulpt

Automatically exported from code.google.com/p/skulpt
Other
0 stars 0 forks source link

Misplaced math functions #90

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Code you're trying to run:
x = 3
print(dir(x))​

What does "real" Python output?
['__abs__', '__add__', '__and__', '__class__', '__cmp__', '__coerce__', 
'__delattr__', '__div__', '__divmod__', '__doc__', '__float__', '__floordiv__', 
'__format__', '__getattribute__', '__getnewargs__', '__hash__', '__hex__', 
'__index__', '__init__', '__int__', '__invert__', '__long__', '__lshift__', 
'__mod__', '__mul__', '__neg__', '__new__', '__nonzero__', '__oct__', '__or__', 
'__pos__', '__pow__', '__radd__', '__rand__', '__rdiv__', '__rdivmod__', 
'__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', 
'__rmod__', '__rmul__', '__ror__', '__rpow__', '__rrshift__', '__rshift__', 
'__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', 
'__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 
'conjugate', 'denominator', 'imag', 'numerator', 'real']

What does Skulpt output?
['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'each', 'exp', 'floor', 
'limit', 'log', 'max', 'min', 'pow', 'round', 'sin', 'sqrt', 'tan', 'times', 
'toFloat', 'toInt', 'toJSON']

Please provide any additional information.
Most of the methods/properties skulpt provides do not belong to each instance 
of the type.  Those belong more in a math module. Additionally, all the 
comparator functions (__cmp__) are not implemented.

Original issue reported on code.google.com by carnioja...@gmail.com on 31 Mar 2011 at 9:36