Modify ↓
Ticket #105 (new defect)
Opened 5 years ago
remove minor code repetition
| Reported by: | py4fun@… | Owned by: | xi |
|---|---|---|---|
| Priority: | low | Component: | pyyaml |
| Severity: | minor | Keywords: | |
| Cc: |
Description
remove minor code repetition in parser (reuse self.peek_event())
Index: C:/projects/workspace_python/PyYAML_2/lib/yaml/parser.py
===================================================================
--- C:/projects/workspace_python/PyYAML_2/lib/yaml/parser.py (revision 298)
+++ C:/projects/workspace_python/PyYAML_2/lib/yaml/parser.py (working copy)
@@ -90,9 +90,7 @@
def check_event(self, *choices):
# Check the type of the next event.
- if self.current_event is None:
- if self.state:
- self.current_event = self.state()
+ self.peek_event()
if self.current_event is not None:
if not choices:
return True
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

