Is there a command, or method for adding descriptive text to a variable such that when you call for the str() of the variable you also see an attribute that describes what’s in it?
I find, in some cases that commenting my code is simply not enough (especially when working with a lot of variables).
Brandon,
comment()andattr()can be useful here. This recent post has some really good information on this.From the help page for
comment():and
str(x)returns: