Wykres commitów

79 Commity (f88a72a88e78ce1cfbd25f0cbf1fbff5e6fd43cb)

Autor SHA1 Wiadomość Data
Damien George 34f813ee29 Merge pull request #162 from chipaca/str_find
Implement a basic str.find; fixes #67
2014-01-12 16:34:03 -08:00
Damien George ec3e14e2af Merge pull request #160 from pfalcon/elaborate-int
Elaborate small-int/long-int
2014-01-12 16:32:21 -08:00
John R. Lenton 7244a14439 oops, nasty off-by-one in set_copy 2014-01-12 23:37:45 +00:00
John R. Lenton be790f94d5 Implemented set binary ops. 2014-01-12 23:09:10 +00:00
John R. Lenton e820491f7a Implement a basic str.find; fixes #67 2014-01-12 21:53:52 +00:00
Paul Sokolovsky 757ac81a69 Add proper checks for fits-in-small-int. Make it reusable.
We likely should make mp_obj_new_int() inline, and rely on its
encapsulated check rather than inline checks everywhere explicitly.

Also, parser for big small int values is still broken.
2014-01-12 22:04:21 +02:00
John R. Lenton 0de386bffe Implemented set.update 2014-01-12 19:50:50 +00:00
John R. Lenton ae00d334c6 Implemented set.remove 2014-01-12 19:16:59 +00:00
John R. Lenton 4a08067c0c Implemented set.isdisjoint 2014-01-12 18:03:21 +00:00
John R. Lenton f1ae6b48fb Implemented set.intersection and set.intersection_update 2014-01-12 17:54:03 +00:00
John R. Lenton 032129f3b5 Implemented set.difference and set.difference_update 2014-01-12 17:07:17 +00:00
John R. Lenton 2a24172cdc Implemented set.discard 2014-01-12 16:39:39 +00:00
John R. Lenton 3b0bd87906 Implemented set.copy 2014-01-12 15:56:25 +00:00
John R. Lenton 1d7fb2f21b Implemented set.clear 2014-01-12 15:44:26 +00:00
John R. Lenton 19b14d3d8a Implemented set.add 2014-01-12 15:29:11 +00:00
John R. Lenton 0ce03b48a0 make sets iterable 2014-01-12 15:17:42 +00:00
Paul Sokolovsky 1945e60aeb list: Implement comparison operators. 2014-01-12 03:34:04 +02:00
Paul Sokolovsky c698d266d1 list: Add extend() methods and += operator. 2014-01-12 00:54:10 +02:00
Damien George ad97f2a49e Merge pull request #136 from pfalcon/for-range-downto
compile_for_stmt_optimised_range(): Properly handle negative & unknown s...
2014-01-10 15:21:50 -08:00
Damien George e9b4b7ac75 Merge pull request #135 from pfalcon/simple-raise
Crude attempt to implement RAISE_VARARGS (with args=1 so far only).
2014-01-10 15:20:08 -08:00
Damien George 46c9e97132 Merge pull request #134 from pfalcon/list-mul
list: Implement list multiplication.
2014-01-10 15:17:17 -08:00
Paul Sokolovsky 899c69f94c compile_for_stmt_optimised_range(): Properly handle negative & unknown steps.
If step is not constant, in first approximation, we can't apply optimization,
(well, we could, but need a special case for this).
2014-01-11 01:00:21 +02:00
Paul Sokolovsky 5388a3c29a Crude attempt to implement RAISE_VARARGS (with args=1 so far only). 2014-01-11 00:55:08 +02:00
Paul Sokolovsky 074d3b5f86 list: Implement list multiplication. 2014-01-11 00:49:19 +02:00
John R. Lenton 4bee76ebca Added dict.fromkeys. Are we done with dict and #99 yet? I do think we are. 2014-01-10 11:25:03 +00:00
John R. Lenton 9ec3a87189 dict views now, refactoring later. 2014-01-10 01:00:20 +00:00
Damien George f09e90316c Merge pull request #121 from pfalcon/count-testcases
Count individual testcases when running tests.
2014-01-09 13:53:02 -08:00
Damien George 004cdcebfe py: Implement base class lookup, issubclass, isinstance. 2014-01-09 21:43:51 +00:00
Damien George 062478e66d Improved type/class/instance code; mp_obj_type_t now has load_attr, store_attr.
Creating of classes (types) and instances is much more like CPython now.
You can use "type('name', (), {...})" to create classes.
2014-01-09 20:57:50 +00:00
Paul Sokolovsky 926d2b621e Count individual testcases when running tests.
The idea is simple: each print represents a testcase within a test unit.
As we don't have strict rules on which/how many testcase are put into
a test file, it's nice to have an idea how many *testcases* we have
totally. Would be nice to count how many testcases pass/fail, but
that's a bit less trivial.
2014-01-08 22:49:34 +02:00
Paul Sokolovsky d944a66ead Add string comparison tests.
Use computed string to exercise string interning code better.
2014-01-08 22:43:26 +02:00
John R. Lenton 9c83ec0eda Merge remote-tracking branch 'upstream/master' into dict_feats 2014-01-07 23:06:46 +00:00
John R. Lenton 27d4ca7693 forgot to add test for dict.update 2014-01-07 22:51:51 +00:00
John R. Lenton be8fe5be2e Added dict.setdefault 2014-01-07 22:51:08 +00:00
John R. Lenton f77dce8a5d Added dict.popitem 2014-01-07 22:51:08 +00:00
John R. Lenton 0fcbaa442f implemented dict.pop 2014-01-07 22:51:08 +00:00
John R. Lenton cd0887352d Added dict.get. 2014-01-07 22:51:08 +00:00
John R. Lenton d90b19eca5 Added dict.copy 2014-01-07 22:51:08 +00:00
John R. Lenton 4ce6ceadca Added dict.clear.
Added 0 to the list of primes. Funky primes, these.
2014-01-07 22:51:08 +00:00
John R. Lenton a41fe31322 Added dict iterator. 2014-01-07 22:51:08 +00:00
John R. Lenton ba3f87c947 Merge remote-tracking branch 'upstream/master' into list_reverse 2014-01-05 22:29:03 +00:00
Damien George 1703597c0b Merge pull request #80 from xyb/striter
Implements str iterator
2014-01-05 05:53:31 -08:00
Damien George f0691f4ed5 Fix qstr in objlist.c; add more tests for list.index.
list.index fails on an edge case.
2014-01-05 13:44:06 +00:00
Damien George a3ab68e949 Merge pull request #78 from chipaca/list_index
Implements list.index. Fixes issue #57.
2014-01-05 05:42:37 -08:00
Damien George 11f1e4b8f1 Add test for basic builtin types. 2014-01-05 11:39:59 +00:00
xyb 8cfc9f07b9 Implements str iterator 2014-01-05 18:47:51 +08:00
John R. Lenton 7e73a8fd09 Merge remote-tracking branch 'upstream/master' into list_index 2014-01-05 01:57:54 +00:00
Damien George 4d4bc9533e Merge pull request #70 from chipaca/list_count
Implements list.count. Fixes isue #55.
2014-01-04 10:09:40 -08:00
Paul Sokolovsky 9464cde3c9 Unbreak string slice test by just switching to normal (not byte) strings. 2014-01-04 19:12:05 +02:00
Paul Sokolovsky 21dfb55dad tests/basics requires python3.3
tests/bytecode/run-tests already uses puthon3.3, so let's just use it here
too.

Fore reference, errors with python 3.2.3:

  File "tests/generator1.py", line 12
    return None
SyntaxError: 'return' with argument inside generator

  File "tests/list_clear.py", line 3, in <module>
    x.clear()
AttributeError: 'list' object has no attribute 'clear'

etc.
2014-01-04 19:06:34 +02:00