Skip to content

Commit ea6c8a6

Browse files
committed
Updated class definition and commens
1 parent 6e3ceb9 commit ea6c8a6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

emacs-the-best-python-editor/PyEval/pyeval_operator.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,17 @@ class Operator:
3131
Common operator class used by the evaluator.
3232
"""
3333

34-
_op_string = "" # String to hold the operator
35-
_op_prec = 0 # Integer to hold the precedence
36-
_op_cnt = 0 # Integer to hold the number of operands to use
37-
3834
def __init__(self, operator_string):
3935
""" Create a new operator object. """
36+
37+
# String to hold the operator
4038
self._op_string = operator_string
41-
self._op_prec = PRECEDENCE[self._op_string]
42-
self._op_cnt = OPERAND_COUNT[self._op_string]
39+
40+
# Integer to hold the precedence
41+
self._op_prec = PRECEDENCE[operator_string]
42+
43+
# Integer to hold the number of operands to use
44+
self._op_cnt = OPERAND_COUNT[operator_string]
4345

4446
@property
4547
def op_string(self):

0 commit comments

Comments
 (0)