Created
November 23, 2016 17:37
-
-
Save j-faria/3c642e1fa69b00653a608232d86dffe6 to your computer and use it in GitHub Desktop.
Special function for Vardan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fun(teff=None, mass=None): | |
if teff and mass: | |
# gave two parameters | |
pass # goto 1 | |
elif teff: | |
# don't have mass, have teff | |
mass = f(teff) | |
elif mass: | |
# don't have teff, have mass | |
# teff = f(mass) | |
# (1) | |
# you have both teff and mass defined | |
fun(2., 1.) # teff=2, mass=1 | |
fun(teff=2., mass=3.) # teff=2, mass=3 | |
fun(mass=4., teff=0.) # ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment