Skip to content

Commit 7345099

Browse files
committed
PERF: Use generator expression instead of list comprehension.
1 parent cef3c85 commit 7345099

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def _coerce_to_ndarray(cls, data):
342342

343343
def _get_attributes_dict(self):
344344
""" return an attributes dict for my class """
345-
return dict([ (k,getattr(self,k,None)) for k in self._attributes])
345+
return dict((k, getattr(self, k, None)) for k in self._attributes)
346346

347347
def view(self, cls=None):
348348

0 commit comments

Comments
 (0)