@@ -41,7 +41,7 @@ def __init__(self):
4141 # Set some main window's properties
4242 self .setWindowTitle ('PyCalc' )
4343 self .setFixedSize (235 , 235 )
44- # Create and set the central widget, and the general layout
44+ # Create, and set the central widget, and the general layout
4545 self .generalLayout = QVBoxLayout ()
4646 self ._centralWidget = QWidget (self )
4747 self .setCentralWidget (self ._centralWidget )
@@ -65,7 +65,7 @@ def _createButtons(self):
6565 """Create the buttons."""
6666 self .buttons = {}
6767 buttonsLayout = QGridLayout ()
68- # btn_text | position in the QGridLayout
68+ # btn_text | position on the QGridLayout
6969 buttons = {'7' : (0 , 0 ),
7070 '8' : (0 , 1 ),
7171 '9' : (0 , 2 ),
@@ -122,13 +122,13 @@ def evaluateExpression(expression):
122122
123123# 4. Create a Controller class to connect the GUI, and the model
124124class PyCalcCtrl :
125- """PyCalc Controller class ."""
125+ """PyCalc's Controller."""
126126
127127 def __init__ (self , model , view ):
128128 """Controller initializer."""
129129 self ._evaluate = model
130130 self ._view = view
131- # Connect signals and slots
131+ # Connect signals, and slots
132132 self ._connectSignals ()
133133
134134 def _calculateResult (self ):
@@ -145,7 +145,7 @@ def _buildExpression(self, sub_exp):
145145 self ._view .setDisplayText (expression )
146146
147147 def _connectSignals (self ):
148- """Connect signals and slots."""
148+ """Connect signals, and slots."""
149149 for btn_text , btn in self ._view .buttons .items ():
150150 if btn_text not in {'=' , 'C' }:
151151 btn .clicked .connect (partial (self ._buildExpression , btn_text ))
0 commit comments