Skip to content

Instantly share code, notes, and snippets.

@dheaney
Last active December 26, 2015 22:19
Show Gist options
  • Select an option

  • Save dheaney/7221698 to your computer and use it in GitHub Desktop.

Select an option

Save dheaney/7221698 to your computer and use it in GitHub Desktop.
from outbreak import Game
import inspect
game = Game(3 , 0)
player = game.players[0]
inspect.getargspec(player.drive)[0] # => ['self', 'city']
inspect.getargspec(inspect.getmembers(player, predicate=inspect.ismethod)[3][1])[0] # => ['self', 'city']
methods = [ x for x in inspect.getmembers(player,
predicate=inspect.ismethod) if x[0] is not 'skip' and x[0] is not 'draw' and x[0] is not '__init__' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment