Damien George
b23fbb3126
py: Implement floating point power binop.
2014-04-02 12:26:49 +01:00
Damien George
660aef67c4
py: Allow multiple of str/list/tuple on left by an integer.
2014-04-02 12:22:07 +01:00
Damien George
4881566874
py: Add support for sep and end keywords in print.
2014-04-02 10:34:44 +01:00
Damien George
084ef373fb
py: Fix math.{ceil,floor,trunc} to return int.
2014-04-01 21:21:50 +01:00
Damien George
e3e0500296
py: Make pfenv.c conform to code conventions.
2014-04-01 21:15:03 +01:00
Damien George
e8e8f212aa
Merge pull request #412 from dhylands/pfenv-strn-stack
...
Pfenv strn stack
2014-04-01 20:55:27 +01:00
Damien George
ef13e2032d
Merge pull request #410 from dhylands/fix-led
...
Fix pyb.Led(n) code to work properly.
2014-04-01 20:52:56 +01:00
Damien George
256afcf9f6
Merge pull request #411 from dhylands/pfenv-64-bit
...
Fix INT_BUF_SIZE to work with 32-bit and 64-bit
2014-04-01 20:18:14 +01:00
Paul Sokolovsky
380cc53bd9
Merge pull request #408 from dhylands/str-quick-tests
...
Turn off full tests in string-format.py
2014-04-02 03:13:51 +08:00
Dave Hylands
1c6b4b2e24
Reduce stack usage of pfenv_print_strn
2014-04-01 11:59:31 -07:00
Dave Hylands
80359aa96e
Fix INT_BUF_SIZE to work with 32-bit and 64-bit
2014-04-01 11:03:44 -07:00
Dave Hylands
18d21d1abd
Fix pyb.Led(n) code to work properly.
2014-04-01 10:41:22 -07:00
Dave Hylands
7adc2e0431
Turn off full tests in string-format.py
...
Add some basic coverage tests
2014-04-01 08:10:02 -07:00
Paul Sokolovsky
51413c8cb6
tests: Add test for implicit float to int conversion (not allowed!)
2014-04-01 13:50:16 +03:00
Damien George
e09320adb5
py: Remove implicit conversion from int to float.
2014-04-01 10:56:07 +01:00
Damien George
46330bd9b5
Merge pull request #407 from dhylands/str-format
...
Enhance str.format support
2014-04-01 10:48:58 +01:00
Dave Hylands
baf6f14deb
Enhance str.format support
...
This adds support for almost everything (the comma isn't currently
supported).
The "unspecified" type with floats also doesn't behave exactly like
python.
Tested under unix with float and double
Spot tested on stmhal
2014-04-01 01:17:33 -07:00
Damien George
e44d26ae0c
py: Implement __getattr__.
...
It's not completely satisfactory, because a failed call to __getattr__
should not raise an exception.
__setattr__ could be implemented, but it would slow down all stores to a
user created object. Need to implement some caching system.
2014-03-31 22:57:56 +01:00
Paul Sokolovsky
4db727afea
objstr: Very basic implementation of % string formatting operator.
2014-03-31 21:20:52 +03:00
Paul Sokolovsky
6ce78c4fae
py: Wrap .__class__ handling in MICROPY_CPYTHON_COMPAT.
...
Because it's superfluos in the presence of type(), a remenant from Python's
"old classes".
2014-03-31 20:40:31 +03:00
Paul Sokolovsky
b509f73982
objtype: Wrap .__name__ handling in MICROPY_CPYTHON_COMPAT.
...
Because it's runtime reflection feature, not required for many apps.
Rant time:
Python could really use better str() vs repr() distinction, for example,
repr(type) could be "<class 'foo'>" (as it is now), and str(type) just
"foo". But alas, getting straight name requires adhoc attribute.
2014-03-31 20:40:31 +03:00
Damien George
a8dda295c4
Fix part->port in README.
2014-03-31 18:09:39 +01:00
Damien George
30a5f853dd
Merge pull request #404 from jonmills/patch-1
...
Update README.md
2014-03-31 18:09:14 +01:00
Damien George
18a6eb9e13
Merge branch 'master' of github.com:micropython/micropython
2014-03-31 18:03:52 +01:00
Damien George
3ff2d03891
py: Fix bug in optimised for .. range.
...
Don't store final, failing value to the loop variable. This fix also
makes for .. range a bit more efficient, as it uses less store/load
pairs for the loop variable.
2014-03-31 18:02:22 +01:00