Skip to main content
8 events
when toggle format what by license comment
Apr 24, 2017 at 18:55 comment added Stephen Rauch @logical123, Fixed.
Apr 24, 2017 at 18:53 history edited Stephen Rauch CC BY-SA 3.0
Add some more explanation and fix typo
Apr 24, 2017 at 18:41 comment added logical123 I noticed a small bug, second to last line should be ==, not !=, I believe. Unfortunately, that is too small an edit for the system to allow me to make. lol
Apr 24, 2017 at 17:50 comment added Stephen Rauch @logical123, You are exactly correct. The thing to note is that the parameter names for __init__ match the keys used in the data_point dict. This mapping was done via the second element in the tuple in the converters dict. This makes it easy to map things cleanly. You maybe unfamiliar with the fact that you can specify non-keyword parameters with keywords, which is how the **dict can expand into the 5 parameters to init the Entry class
Apr 24, 2017 at 17:41 comment added logical123 When you have a moment, can you explain the syntax cls(**data_point) ? I understand that cls and self are basically equivalent with cls marking a class function vs an instance function, while ** means keyword argument packing, but I'm not sure what that combination does exactly. Instantiate a new instance of the class with the data_point packed as a Dictionary?
Apr 23, 2017 at 22:52 history edited Stephen Rauch CC BY-SA 3.0
Minor cleanup
Apr 23, 2017 at 20:59 vote accept logical123
Apr 23, 2017 at 20:58 history answered Stephen Rauch CC BY-SA 3.0