Skip to content

Commit d0f5ff4

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

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
@@ -324,7 +324,7 @@ def _coerce_to_ndarray(cls, data):
324324

325325
def _get_attributes_dict(self):
326326
""" return an attributes dict for my class """
327-
return dict([ (k,getattr(self,k,None)) for k in self._attributes])
327+
return dict((k, getattr(self, k, None)) for k in self._attributes)
328328

329329
def view(self, cls=None):
330330

0 commit comments

Comments
 (0)