Message2889

Author cgroves
Recipients
Date 2007-09-30.01:26:42
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The code in PySliceDerived.java in this patch is different from the code that is generated by running gderived.py on the included slice.derived.  With the included PySliceDerived, PySlice.java doesn't compile as its new is expecting a different constructor on PySliceDerived.  To make a different constructor in a derived class, you need to modify the ctr: line in the .derived file.  Look at str.derived.  You should also modify the mappings file in src/templates so python gderived.py slice.derived and python gexpose.py slice.expose work.

The slice type has a method indices and fields start, stop and step in CPython.  This patch needs to add those.  In particular, test_slice.py does some tests on indices which blow up with this patch in place.  We should be able to remove test_slice from the failures list in regrtest.py after this patch is applied.  It'd be nice to add some tests for start, stop and step in test_slice as well.

The duplicated code in each of the PySlice constructors and the init method is also fairly disturbing.  They're all doing the same thing, so it should be done in a single place.  Unnecessarily duplicated code is one of the most evil substances in the universe.

Finally, I think Philip may have already mentioned this, but just in case, we're going for all spaces in Jython's source.  No tabs.
History
Date User Action Args
2008-02-20 17:18:50adminlinkissue1798544 messages
2008-02-20 17:18:50admincreate