Category : comma

At the risk of starting a religious war, I’m finally asking this: is there any python linter option that allows or even enforces leading commas on lists and multi-line function arguments? I love everything that black does, but anything to do with a comma deals with trailing commas or not. Even if the vast majority ..

Read more

I am using the code below as a template for writing a data generator function in TensorFlow and I was wondering if the trailing comma below is necessary or useful: def __data_generation(self, list_IDs_temp): ‘Generates data containing batch_size samples’ # X : (n_samples, *dim, n_channels) # Initialization X = np.empty((self.batch_size, *self.dim, self.n_channels)) y = np.empty((self.batch_size), dtype=int) ..

Read more