skulpt / skulpt

Skulpt is a Javascript implementation of the Python programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Named Arguments are called twice

lewysigns opened this issue · comments

I have created a module that defines a class and a function:

def f(c):
    print(c)

class C:
    def __init__(self):
        print('hello')

Then I have called it with and without named argument:

        print('calling f without named argument')
        f(C())

        print('calling f with named argument')
        f(c=C())

The result is double execution with named argument.

It looks like this has nothing to do with forms. Can be reproduced also from the console:

image

credit to @stefano.menci in the anvil forum for providing the above example.

https://anvil.works/forum/t/init-called-twice-if-object-constructed-in-alert/15084/2?u=anthonys

Thank you!