On 8/3/19 10:56 AM, Malcolm Greene wrote:
> Thanks for everyone's feedback. Some interesting thoughts including Alan's 
> "classes should never be named for their data but for their function" 
> feedback. I'm going to have to noodle on that one. Good stuff!

And more:

if the class is really just a data container, then no need to make it a
class. Use a namedtuple (or as Cameron suggested,
types.SimpleNamespace).  Of course we still don't know if that's the
case...

General comment on naming: you don't need to qualify things if the
context makes it clear, all it does is make you type more stuff (or, I
guess, exercise autocomplete in your IDE).  A favorite one is to call
your custom exception MyProgramSpecificException.  Since this is going
to appear in a line with raise or except in it, the word Exception is
superfluous.  This comes up in regards to an idea of using something
like TelemetryData or TelemetryStatistics.  It also comes up here:

>> file_count
>> line_count
>> byte_count
>> row_count
>> batch_count
>> job_count
>> error_count
>> warning_count

why not "files", "lines", "bytes"... the plural form already tells you
it's a counter.

Opinions, we all have 'em  :)

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to