Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit tuple parameter unpacking is removed in python 3 #12009

Merged
merged 4 commits into from
Oct 30, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CondCore/TagCollection/python/seqvaluedict.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def split(self,function,Ignore=None):
splitdict[skey][key] = self.dict[key]
return splitdict
def swap(self):
tmp = self.__class__(map(lambda (x,y):(y,x),self.items()))
tmp = self.__class__(map(lambda x_y:(x_y[1],x_y[0]),self.items()))
self.list,self.dict = tmp.list,tmp.dict
def update(self,newdict):
for key,value in newdict.items():
Expand Down
6 changes: 3 additions & 3 deletions Documentation/ReferenceManualScripts/python/BeautifulSoup.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,10 @@ def __init__(self, parser, name, attrs=None, parent=None,
self.escapeUnrecognizedEntities = parser.escapeUnrecognizedEntities

# Convert any HTML, XML, or numeric entities in the attribute values.
convert = lambda(k, val): (k,
convert = lambda k_val: (k_val[0],
re.sub("&(#\d+|#x[0-9a-fA-F]+|\w+);",
self._convertEntities,
val))
k_val[1]))
self.attrs = map(convert, self.attrs)

def getString(self):
Expand Down Expand Up @@ -1824,7 +1824,7 @@ def _convertFrom(self, proposed):
"iso-8859-1",
"iso-8859-2"):
markup = re.compile("([\x80-\x9f])").sub \
(lambda(x): self._subMSChar(x.group(1)),
(lambda x: self._subMSChar(x.group(1)),
markup)

try:
Expand Down
3 changes: 2 additions & 1 deletion FWCore/ParameterSet/python/TreeCrawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def import_module(self,partnam,fqname,parent):
if r is not None:
self._depgraph.setdefault(self._last_caller.__name__,{})[r.__name__] = 1
return r
def load_module(self, fqname, fp, pathname, (suffix, mode, type)):
def load_module(self, fqname, fp, pathname, xxx_todo_changeme):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide a better name for the variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That actually comes straight from the futurize conversion, but if you have a suggestion (I think this is code you own) I will be happy to update the branch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aux_info?

(suffix, mode, type) = xxx_todo_changeme
r = modulefinder.ModuleFinder.load_module(self, fqname, fp, pathname, (suffix, mode, type))
if r is not None:
self._types[r.__name__] = type
Expand Down
3 changes: 2 additions & 1 deletion RecoLuminosity/LumiDB/plotdata/create_public_lumi_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,11 @@ def GetXLocator(ax):

######################################################################

def TweakPlot(fig, ax, (time_begin, time_end),
def TweakPlot(fig, ax, xxx_todo_changeme,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time_range?

add_extra_head_room=False):

# Fiddle with axes ranges etc.
(time_begin, time_end) = xxx_todo_changeme
ax.relim()
ax.autoscale_view(False, True, True)
for label in ax.get_xticklabels():
Expand Down
3 changes: 2 additions & 1 deletion RecoLuminosity/LumiDB/plotdata/create_public_peakpu_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ def GetXLocator(ax):

######################################################################

def TweakPlot(fig, ax, (time_begin, time_end),
def TweakPlot(fig, ax, xxx_todo_changeme,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time_range?

add_extra_head_room=False):

# Fiddle with axes ranges etc.
(time_begin, time_end) = xxx_todo_changeme
ax.relim()
ax.autoscale_view(False, True, True)
for label in ax.get_xticklabels():
Expand Down