Anonymous avatar Anonymous committed a97d1df

Renaming PyCore._has_block to has_block

Comments (0)

Files changed (5)

 ===========
 
 
+- Show quick outline; C-o : June 23, 2006
+
+
 - Go to definition; F3 : June 22, 2006
 
 
   * Writing ASTs
 
 
-* Show quick outline; C-o @ 2
-
-
 Remaining Stories
 =================
 * Change program goals and description; principles.html

docs/workingon.txt

-Show quick outline; C-o @ 2
-===========================
+Refactoring
+===========
 
-- Enhance uihelper.TreeViewer
-
-  - '+' to expand nodes
-  - '-' to shrink nodes
-
-* PyCore._has_block to PyCore.has_block
+- PyCore._has_block to PyCore.has_block
 
 * Refactorings
 
 def _get_pyname_children(pyname):
     result = []
     for name, pyname in pyname.get_attributes().iteritems():
-        if pyname._has_block():
+        if pyname.has_block():
             result.append(PythonOutlineNode(name, pyname))
     result.sort()
     return result
         self.is_defined_here = is_defined_here
         self.lineno = lineno
         self.module = module
-        if self._has_block():
+        if self.has_block():
             self.lineno = self._get_ast().lineno
 
     def update_object(self, object_=None, is_defined_here=False, lineno=None, module=None):
         """Returns a (module, lineno) tuple"""
         return (self.module, self.lineno)
 
-    def _has_block(self):
+    def has_block(self):
         return self.is_defined_here and isinstance(self.object,
                                                    PyDefinedObject)
     
     def _create_scopes(self):
         block_objects = [pyname.object for pyname in
                          self.pyobject.get_attributes().values()
-                         if pyname._has_block()]
+                         if pyname.has_block()]
         def block_compare(x, y):
             return cmp(x._get_ast().lineno, y._get_ast().lineno)
         block_objects.sort(cmp=block_compare)
 
     def _create_scopes(self):
         block_objects = [pyname.object for pyname in self._get_names().values()
-                         if pyname._has_block()]
+                         if pyname.has_block()]
         def block_compare(x, y):
             return cmp(x._get_ast().lineno, y._get_ast().lineno)
         block_objects.sort(cmp=block_compare)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.