Skip to content

Commit

Permalink
Python3 and recent python 2 use sys.maxsize and no sys.maxint
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvaandering committed Oct 19, 2015
1 parent afee369 commit a92e4a1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def next(self):
currentEvent=self.dataAccessor().eventNumber()
allEvents=self.dataAccessor().numberOfEvents()
if allEvents==None:
allEvents=sys.maxint
allEvents=sys.maxsize
if currentEvent<allEvents:
self.navigate(currentEvent+1)

Expand All @@ -135,7 +135,7 @@ def last(self):
currentEvent=self.dataAccessor().eventNumber()
allEvents=self.dataAccessor().numberOfEvents()
if allEvents==None:
allEvents=sys.maxint
allEvents=sys.maxsize
if currentEvent<allEvents:
self.navigate(allEvents)

Expand All @@ -146,7 +146,7 @@ def goto(self, number=None):
if self._dataAccessor.numberOfEvents():
max = self._dataAccessor.numberOfEvents()
else:
max = sys.maxint
max = sys.maxsize
if number!=None:
ok=(number>=1, number<=max)
else:
Expand Down
2 changes: 1 addition & 1 deletion FWCore/GuiBrowsers/python/Vispa/Views/LineDecayView.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ def boundingRect(self):
def slope(self):
deltaX = self._endNode.x() - self._startNode.x()
if deltaX == 0:
return sys.maxint
return sys.maxsize

return 1.0 * (self._endNode.y() - self._startNode.y()) / deltaX

Expand Down
2 changes: 1 addition & 1 deletion Validation/Performance/scripts/cmsPerfStripChart.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def get_yaxis_range(list):
about an IB, this function returns a tuple (low, high) with the lowest
and the highest value of y-axis, respectively.
"""
low, high = sys.maxint, -1
low, high = sys.maxsize, -1
for node in list:
low = min((node['average'] - node['error']), low)
high = max((node['average'] + node['error']), high)
Expand Down

0 comments on commit a92e4a1

Please sign in to comment.