Negroup - wrote:
> Hi all, I have a question about the following lines of code:
>
>
class Foo:
>
> ... bar = 'bar'
> ...
>
# is it better this
def te(attribute):
>
> ... try:
> ... print getattr(c, attribute)
> ... except AttributeError:
> ... re
Hi all, I have a question about the following lines of code:
>>> class Foo:
... bar = 'bar'
...
>>> # is it better this
>>> def te(attribute):
... try:
... print getattr(c, attribute)
... except AttributeError:
... return None
>>> #
>>> # or this?
>>> def h_a(at