Skip to content

Instantly share code, notes, and snippets.

@razhangwei
Created March 23, 2019 01:40
Show Gist options
  • Select an option

  • Save razhangwei/9866dde1458fc5d6b6289c5c219907ec to your computer and use it in GitHub Desktop.

Select an option

Save razhangwei/9866dde1458fc5d6b6289c5c219907ec to your computer and use it in GitHub Desktop.
Python abstract class #Python
from abc import ABC, abstractmethod
class Foo(ABC, object):
@property
@abstractmethod
def f(self):
pass
@abstractmethod
def g(self):
pass
class Bar(Foo):
@property
def f(self):
return 0
def g(self):
print("hhh")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment