catalystneuro / lazy_ops

Lazy transposing and slicing of h5py and Zarr Datasets
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

instance attributes defined outside init #8

Closed bendichter closed 5 years ago

bendichter commented 5 years ago

It is best practice to have all attributes defined within __init__. self.reversed_axis_order (line 128) and self.key_reinit (line 186) are attributes defined outside __init__. This is ok if there is a good reason for doing it this way, but it would be better to not define attributes outside __init__ if we can avoid it. We could either remove the self and make these local variables or initialize them to None in __init__.

d-sot commented 5 years ago

They're local variables now in 38432436dfa3eced8d6a2a73062f303bb05e154e . I had considered using as class attributes but it became necessary.