You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by va...@apache.org on 2009/02/23 10:24:02 UTC

svn commit: r746941 - in /lucene/pylucene/trunk: Makefile collections.py

Author: vajda
Date: Mon Feb 23 09:23:58 2009
New Revision: 746941

URL: http://svn.apache.org/viewvc?rev=746941&view=rev
Log:
added minimal docstring to new JavaSet class

Modified:
    lucene/pylucene/trunk/Makefile
    lucene/pylucene/trunk/collections.py

Modified: lucene/pylucene/trunk/Makefile
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/Makefile?rev=746941&r1=746940&r2=746941&view=diff
==============================================================================
--- lucene/pylucene/trunk/Makefile (original)
+++ lucene/pylucene/trunk/Makefile Mon Feb 23 09:23:58 2009
@@ -96,7 +96,7 @@
 #NUM_FILES=2
 
 # Windows   (Win32, Python 2.5.1, Java 1.6, ant 1.7.0)
-#PREFIX_PYTHON=/cygdrive/o/Python-2.5.2
+#PREFIX_PYTHON=/cygdrive/o/Python-2.5.2/PCbuild
 #ANT=JAVA_HOME=o:\\Java\\jdk1.6.0_02 /cygdrive/o/java/apache-ant-1.7.0/bin/ant
 #PYTHON=$(PREFIX_PYTHON)/python.exe
 #JCC=$(PYTHON) -m jcc --shared

Modified: lucene/pylucene/trunk/collections.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/collections.py?rev=746941&r1=746940&r2=746941&view=diff
==============================================================================
--- lucene/pylucene/trunk/collections.py (original)
+++ lucene/pylucene/trunk/collections.py Mon Feb 23 09:23:58 2009
@@ -14,6 +14,9 @@
 
 
 class JavaSet(PythonSet):
+    """
+    This class implements java.util.Set around a Python set instance it wraps.
+    """
 
     def __init__(self, _set):
         super(JavaSet, self).__init__()
@@ -22,6 +25,9 @@
     def __contains__(self, obj):
         return obj in self._set
 
+    def __len__(self):
+        return len(self._set)
+
     def __iter__(self):
         return iter(self._set)