Skip to content

Instantly share code, notes, and snippets.

@MichalMazurek
Last active September 25, 2019 08:43
Show Gist options
  • Save MichalMazurek/ed209363cce22a0d491c7eb9b118baf3 to your computer and use it in GitHub Desktop.
Save MichalMazurek/ed209363cce22a0d491c7eb9b118baf3 to your computer and use it in GitHub Desktop.
from typing import Dict, List
def some_func(value: str, data: List = []) -> Dict or List[str]:
data.append(value)
return data
d = some_func("test")
some_func("test2", d)
print(d)
d2 = some_func("test3")
print(d2)
print(d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment