- 01 Apr, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
Enhance str.format support
-
Dave Hylands authored
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
-
- 31 Mar, 2014 23 commits
-
-
Damien George authored
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.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Because it's superfluos in the presence of type(), a remenant from Python's "old classes".
-
Paul Sokolovsky authored
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.
-
Damien George authored
-
Damien George authored
Update README.md
-
Damien George authored
-
Damien George authored
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.
-
Paul Sokolovsky authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Yes, I know, a good compiler will optimise this away, but I feel this is neater.
-
Paul Sokolovsky authored
It's virtual because it's not shown in dir(...). (That's also how CPython has it).
-
Paul Sokolovsky authored
There was thinkos that either send_value or throw_value is specified, but there were cases with both. Note that send_value is pushed onto generator's stack - but that's probably only good, because if we throw exception into gen, it should not ever use send_value, and that will be just extra "assert".
-
Paul Sokolovsky authored
In this case, the exception is just re-thrown - the ideas is that object doesn't handle this exception specially, so it will propagated per Python semantics.
-
Paul Sokolovsky authored
.throw() propagates any exceptions, and .close() swallows them. Yielding in reponse to .throw(GeneratorExit) is still fatal, and we need to handle it for .throw() case separately (previously it was handled only for .close() case). Obscure corner cases due to test_pep380.py.
-
Paul Sokolovsky authored
-
Damien George authored
These are default arguments after a bare *.
-
jon mills authored
Very minor typo
-
Damien George authored
-
Damien George authored
Adding this bytecode allows to remove 4 others related to function/method calls with * and ** support. Will also help with bytecodes that make functions/closures with default positional and keyword args.
-
Damien George authored
In preparation for implementing default keyword arguments.
-
- 30 Mar, 2014 14 commits
-
-
Paul Sokolovsky authored
"1/0" is sacred idiom, the shortest way to break program execution (sys.exit() is too long).
-
Paul Sokolovsky authored
TODO: Likely doesn't match Python semantics for negative numbers.
-
Paul Sokolovsky authored
The way it is, just crashes app. And optimizing to "raise ZeroDivisionError" is probably too much.
-
Paul Sokolovsky authored
This matches CPython behavior and hopefully can be treated as general Python semantics.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
One of the reason for separate "message" (besides still unfulfilled desire to optimize memory usage) was apparent special handling of exception with messages by CPython. Well, the message is still just an exception argument, it just printed specially. Implement that with PRINT_EXC printing format.
-
Damien George authored
-
Damien George authored
-
Damien George authored
Eg class A(): pass would fail an assertion.
-
Damien George authored
-
Damien George authored
objgenerator: Handle default args to generator functions.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Iterators and ducktype objects can now be arguments of yield from.
-
Paul Sokolovsky authored
-