[pypy-commit] pypy refactor-signature: improve names a bit
fijal
noreply at buildbot.pypy.org
Tue Dec 20 20:17:11 CET 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: refactor-signature
Changeset: r50770:034b7e34339e
Date: 2011-12-20 21:16 +0200
http://bitbucket.org/pypy/pypy/changeset/034b7e34339e/
Log: improve names a bit
diff --git a/pypy/module/micronumpy/REVIEW.txt b/pypy/module/micronumpy/REVIEW.txt
--- a/pypy/module/micronumpy/REVIEW.txt
+++ b/pypy/module/micronumpy/REVIEW.txt
@@ -4,8 +4,6 @@
* VirtualSlice vs. W_NDimSlice?
* W_NDimSlice.__init__ calls ConcreteArray.__init__ instead of
ViewArray.__init__, W_FlatIterator as well.
-* Better names for sigeq and sigeq2, sighash doesn't say if numberings are
- included in the hash.
* Cleanup of the iterator and array caching/numbering. It's a mess right now:
* _creater_iter updates the arraylist
* Why do Scalars need an iterator at all?
diff --git a/pypy/module/micronumpy/signature.py b/pypy/module/micronumpy/signature.py
--- a/pypy/module/micronumpy/signature.py
+++ b/pypy/module/micronumpy/signature.py
@@ -8,7 +8,9 @@
def sigeq(one, two):
return one.eq(two)
-def sigeq2(one, two):
+def sigeq_numbering(one, two):
+ """ Cache for iterator numbering should not compare array numbers
+ """
return one.eq(two, compare_array_no=False)
def sighash(sig):
@@ -71,7 +73,7 @@
iter_no = 0
def invent_numbering(self):
- cache = r_dict(sigeq2, sighash)
+ cache = r_dict(sigeq_numbering, sighash)
allnumbers = []
self._invent_numbering(cache, allnumbers)
More information about the pypy-commit
mailing list