Skip to content

Instantly share code, notes, and snippets.

@benspaulding
Created May 28, 2009 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benspaulding/119074 to your computer and use it in GitHub Desktop.
Save benspaulding/119074 to your computer and use it in GitHub Desktop.
class Foo(object):
bar = ['this', 'that']
class Baz(Foo):
# What is the best way to make the bar attr equal to the super class’s
# bar attr with some more items appended to the list?
#
# This obviously doesn't work, but it is the sort of thing I want.
bar += ['those', 'these']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment