''''''

### function ###
# define
def my_func(month, year, method='hf'):
    '''My function'''

    print("MM/YYYY = {:2}{:<4}".format(month,year))
    print("method =", method)

    if type(month) is int and month < 12:
        month += 1

    if type(year) is int:
        month *= 2

    return month, year

# run
a, b = my_func(2019, 12)
my_func(2019, 12, method='dft')
print("a, b =", a, b)

print('\n\n')


### class ###
class MyClass():
    ''''''

    def my_func1(a, b, *args):
        ''''''
        print(" my_func1: args =", args)
        print(" my_func1: *args =", *args)
        print(" my_func1: type(args) =", type(args))

        return 0

    def my_func2(b, *args, method='hf', basis='3-21g', **kwargs):
        ''''''
        print(" my_func2: kwargs =", kwargs)
        for k, v in kwargs.items():
            print(" my_func2: k, v =", k, v)
        print(" my_func2: type(kwargs) =", type(kwargs))

        return 1

# instantiate
instance1 = MyClass()
instance1.my_func1(1,2,3,4,'tmp')

instance2 = MyClass()
instance2.my_func2(19, functional='blyp')

print("instance1 == instance2:", instance1 == instance2)

print('\n\n')


