Paul Sokolovsky
d944a66ead
Add string comparison tests.
Use computed string to exercise string interning code better.
11 years ago
John R. Lenton
9c83ec0eda
Merge remote-tracking branch 'upstream/master' into dict_feats
11 years ago
John R. Lenton
27d4ca7693
forgot to add test for dict.update
11 years ago
John R. Lenton
be8fe5be2e
Added dict.setdefault
11 years ago
John R. Lenton
f77dce8a5d
Added dict.popitem
11 years ago
John R. Lenton
0fcbaa442f
implemented dict.pop
11 years ago
John R. Lenton
cd0887352d
Added dict.get.
11 years ago
John R. Lenton
d90b19eca5
Added dict.copy
11 years ago
John R. Lenton
4ce6ceadca
Added dict.clear.
Added 0 to the list of primes. Funky primes, these.
11 years ago
John R. Lenton
a41fe31322
Added dict iterator.
11 years ago
John R. Lenton
c06763a020
This implements a better (more python-conformant) list.sort.
It's not really about that, though; it's about me figuring out a sane
way forward for keyword-argument functions (and function
metadata). But it's useful as is, and shouldn't break any existing
code, so here you have it; I'm going to park it in my mind for a bit
while sorting out the rest of the dict branch.
11 years ago
Damien George
f0691f4ed5
Fix qstr in objlist.c; add more tests for list.index.
list.index fails on an edge case.
11 years ago
Damien George
11f1e4b8f1
Add test for basic builtin types.
11 years ago
xyb
8cfc9f07b9
Implements str iterator
11 years ago
Paul Sokolovsky
9464cde3c9
Unbreak string slice test by just switching to normal (not byte) strings.
11 years ago
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.
11 years ago
John R. Lenton
6e1e98f864
Implements list.reverse; fixes issue #66
11 years ago
John R. Lenton
49fb6e53b3
Implements list.remove (in terms of list.index and list.pop).
Fixes issue #63 .
11 years ago
Paul Sokolovsky
6ee1e383d6
str slice: Trim slice indexes to be in range.
11 years ago
John R. Lenton
45a8744617
Implements list.insert. Fixes issue #61 .
11 years ago
Damien George
c8d1384fc0
Fix int -> machine_int_t; add print to slice test.
11 years ago
Paul Sokolovsky
26534cec85
Add test for byte string slicing.
11 years ago
John R. Lenton
5d4a821339
Implements list.index. Fixes issue #57 .
11 years ago
John R. Lenton
e241e8c169
Implemented list.count
11 years ago
John R. Lenton
26c211648b
Implemented list.copy. Fixes issue #54 .
11 years ago
John R. Lenton
069ded9514
Added list.clear. Fixes issue #53 .
11 years ago
John R. Lenton
64427d6ee6
renamed some tests to have better names.
11 years ago
John R. Lenton
25f417c08c
Worked on list.pop:
* Fixes issue #51
* Adds a specific error message for when you try to pop an empty list.
* Releases some memory if the list has shurnk a lot.
11 years ago
Damien George
66028ab6dc
Basic implementation of import.
import works for simple cases. Still work to do on finding the right
script, and setting globals/locals correctly when running an imported
function.
11 years ago
John R. Lenton
4cb80582c4
Add list addition ( fixes : #39 )
11 years ago
Damien George
0ff883904a
py: Fix generator where state array was incorrectly indexed.
Generator objects now allocate the object and the state in one malloc.
This improvement fixes Issue #38 .
11 years ago
Damien George
bbabfb40ba
Fix bash->/usr/bin/env bash; add LICENSE for Python library tests.
11 years ago
Damien George
6baf76e28b
py: make closures work.
11 years ago
Damien
046147dcd5
Small change to handling of integers in run-tests.
11 years ago
Damien
39977a56da
Add basic functionality tests for the Python bit.
11 years ago
Damien
5ebbfe7e51
Add 2 files to a gitignore.
11 years ago
Damien
2eda70874e
Add tests to test compiler and emitted byte code.
11 years ago