Skip to content

Instantly share code, notes, and snippets.

@mike1026915
Last active May 13, 2017 12:42
Show Gist options
  • Save mike1026915/8507e19c6bc934b8464e83e2767c60fe to your computer and use it in GitHub Desktop.
Save mike1026915/8507e19c6bc934b8464e83e2767c60fe to your computer and use it in GitHub Desktop.
Python class if
class Popen(object):
if mswindows:
def communicate(self):
"""
Windows implementation
"""
pass
else:
def communicate(self):
"""
Non-windows(POSIX) implementation
"""
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment