| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -216,8 +216,8 @@ def trace_vdelete(self, mode, cbname): | |||
| 216 | 216 | self._master.deletecommand(cbname) | |
| 217 | 217 | def trace_vinfo(self): | |
| 218 | 218 | """Return all trace callback information.""" | |
| 219 | - return map(self._tk.split, self._tk.splitlist( | ||
| 220 | - self._tk.call("trace", "vinfo", self._name))) | ||
| 219 | + return [self._tk.split(x) for x in self._tk.splitlist( | ||
| 220 | + self._tk.call("trace", "vinfo", self._name))] | ||
| 221 | 221 | def __eq__(self, other): | |
| 222 | 222 | """Comparison for equality (==). | |
| 223 | 223 | ||
@@ -855,7 +855,7 @@ def winfo_visualsavailable(self, includeids=0): | |||
| 855 | 855 | includeids and 'includeids' or None)) | |
| 856 | 856 | if isinstance(data, str): | |
| 857 | 857 | data = [self.tk.split(data)] | |
| 858 | - return map(self.__winfo_parseitem, data) | ||
| 858 | + return [self.__winfo_parseitem(x) for x in data] | ||
| 859 | 859 | def __winfo_parseitem(self, t): | |
| 860 | 860 | """Internal function.""" | |
| 861 | 861 | return t[:1] + tuple(map(self.__winfo_getint, t[1:])) | |
@@ -1200,8 +1200,8 @@ def __setitem__(self, key, value): | |||
| 1200 | 1200 | self.configure({key: value}) | |
| 1201 | 1201 | def keys(self): | |
| 1202 | 1202 | """Return a list of all resource names of this widget.""" | |
| 1203 | - return map(lambda x: x[0][1:], | ||
| 1204 | - self.tk.split(self.tk.call(self._w, 'configure'))) | ||
| 1203 | + return [x[0][1:] for x in | ||
| 1204 | + self.tk.split(self.tk.call(self._w, 'configure'))] | ||
| 1205 | 1205 | def __str__(self): | |
| 1206 | 1206 | """Return the window path name of this widget.""" | |
| 1207 | 1207 | return self._w | |
@@ -1223,18 +1223,18 @@ def pack_propagate(self, flag=_noarg_): | |||
| 1223 | 1223 | def pack_slaves(self): | |
| 1224 | 1224 | """Return a list of all slaves of this widget | |
| 1225 | 1225 | in its packing order.""" | |
| 1226 | - return map(self._nametowidget, | ||
| 1227 | - self.tk.splitlist( | ||
| 1228 | - self.tk.call('pack', 'slaves', self._w))) | ||
| 1226 | + return [self._nametowidget(x) for x in | ||
| 1227 | + self.tk.splitlist( | ||
| 1228 | + self.tk.call('pack', 'slaves', self._w))] | ||
| 1229 | 1229 | slaves = pack_slaves | |
| 1230 | 1230 | # Place method that applies to the master | |
| 1231 | 1231 | def place_slaves(self): | |
| 1232 | 1232 | """Return a list of all slaves of this widget | |
| 1233 | 1233 | in its packing order.""" | |
| 1234 | - return map(self._nametowidget, | ||
| 1235 | - self.tk.splitlist( | ||
| 1234 | + return [self._nametowidget(x) for x in | ||
| 1235 | + self.tk.splitlist( | ||
| 1236 | 1236 | self.tk.call( | |
| 1237 | - 'place', 'slaves', self._w))) | ||
| 1237 | + 'place', 'slaves', self._w))] | ||
| 1238 | 1238 | # Grid methods that apply to the master | |
| 1239 | 1239 | def grid_bbox(self, column=None, row=None, col2=None, row2=None): | |
| 1240 | 1240 | """Return a tuple of integer coordinates for the bounding | |
@@ -1338,9 +1338,9 @@ def grid_slaves(self, row=None, column=None): | |||
| 1338 | 1338 | args = args + ('-row', row) | |
| 1339 | 1339 | if column is not None: | |
| 1340 | 1340 | args = args + ('-column', column) | |
| 1341 | - return map(self._nametowidget, | ||
| 1342 | - self.tk.splitlist(self.tk.call( | ||
| 1343 | - ('grid', 'slaves', self._w) + args))) | ||
| 1341 | + return [self._nametowidget(x) for x in | ||
| 1342 | + self.tk.splitlist(self.tk.call( | ||
| 1343 | + ('grid', 'slaves', self._w) + args))] | ||
| 1344 | 1344 | ||
| 1345 | 1345 | # Support for the "event" command, new in Tk 4.2. | |
| 1346 | 1346 | # By Case Roole. | |
@@ -1494,7 +1494,7 @@ def wm_colormapwindows(self, *wlist): | |||
| 1494 | 1494 | if len(wlist) > 1: | |
| 1495 | 1495 | wlist = (wlist,) # Tk needs a list of windows here | |
| 1496 | 1496 | args = ('wm', 'colormapwindows', self._w) + wlist | |
| 1497 | - return map(self._nametowidget, self.tk.call(args)) | ||
| 1497 | + return [self._nametowidget(x) for x in self.tk.call(args)] | ||
| 1498 | 1498 | colormapwindows = wm_colormapwindows | |
| 1499 | 1499 | def wm_command(self, value=None): | |
| 1500 | 1500 | """Store VALUE in WM_COMMAND property. It is the command | |
@@ -2157,9 +2157,9 @@ def canvasy(self, screeny, gridspacing=None): | |||
| 2157 | 2157 | def coords(self, *args): | |
| 2158 | 2158 | """Return a list of coordinates for the item given in ARGS.""" | |
| 2159 | 2159 | # XXX Should use _flatten on args | |
| 2160 | - return map(getdouble, | ||
| 2160 | + return [getdouble(x) for x in | ||
| 2161 | 2161 | self.tk.splitlist( | |
| 2162 | - self.tk.call((self._w, 'coords') + args))) | ||
| 2162 | + self.tk.call((self._w, 'coords') + args))] | ||
| 2163 | 2163 | def _create(self, itemType, args, kw): # Args: (val, val, ..., cnf={}) | |
| 2164 | 2164 | """Internal function.""" | |
| 2165 | 2165 | args = _flatten(args) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -268,10 +268,10 @@ def info(self, option=None): | |||
| 268 | 268 | return self.tk.call('tixForm', 'info', self._w, option) | |
| 269 | 269 | ||
| 270 | 270 | def slaves(self): | |
| 271 | - return map(self._nametowidget, | ||
| 272 | - self.tk.splitlist( | ||
| 271 | + return [self._nametowidget(x) for x in | ||
| 272 | + self.tk.splitlist( | ||
| 273 | 273 | self.tk.call( | |
| 274 | - 'tixForm', 'slaves', self._w))) | ||
| 274 | + 'tixForm', 'slaves', self._w))] | ||
| 275 | 275 | ||
| 276 | 276 | ||
| 277 | 277 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -752,7 +752,7 @@ def _pointlist(self, item): | |||
| 752 | 752 | [(0.0, 9.9999999999999982), (0.0, -9.9999999999999982), | |
| 753 | 753 | (9.9999999999999982, 0.0)] | |
| 754 | 754 | >>> """ | |
| 755 | - cl = list(self.cv.coords(item)) | ||
| 755 | + cl = self.cv.coords(item) | ||
| 756 | 756 | pl = [(cl[i], -cl[i+1]) for i in range(0, len(cl), 2)] | |
| 757 | 757 | return pl | |
| 758 | 758 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments