Mercurial > pylearn
comparison doc/v2_planning/API_coding_style.txt @ 1318:565e4ef0bfbd
Fixed comment in example: lists have no find() method
author | Olivier Delalleau <delallea@iro> |
---|---|
date | Fri, 08 Oct 2010 12:00:05 -0400 |
parents | b60a9b6eee68 |
children | 075a0f1c1ffc |
comparison
equal
deleted
inserted
replaced
1317:9f1f51a5939f | 1318:565e4ef0bfbd |
---|---|
539 | 539 |
540 # One blank line between method definitions. | 540 # One blank line between method definitions. |
541 def add_field(self, field): | 541 def add_field(self, field): |
542 # TODO Write doc. | 542 # TODO Write doc. |
543 # Test if something belongs to a container with `in`, not | 543 # Test if something belongs to a container with `in`, not |
544 # container-specific methods like `find`. | 544 # container-specific methods like `index`. |
545 if field in self.print_fields: | 545 if field in self.print_fields: |
546 # TODO Print a warning and do nothing. | 546 # TODO Print a warning and do nothing. |
547 pass | 547 pass |
548 else: | 548 else: |
549 # This is why using [] as default to print_fields in the | 549 # This is why using [] as default to print_fields in the |