Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does anyone really dislike the __call__ syntax? #61

Open
goodboy opened this issue Dec 24, 2020 · 5 comments
Open

Does anyone really dislike the __call__ syntax? #61

goodboy opened this issue Dec 24, 2020 · 5 comments

Comments

@goodboy
Copy link
Member

goodboy commented Dec 24, 2020

I remember way back when first writing this we had an internal debate about .run() versus __call__() and can't remember why we settled on the latter.

In hindsight, after more years of codezing, I think the .run() is more clear and pythonic maybe?

Does anyone have opinions on this?

@kontsaki
Copy link
Contributor

i agree that .run() is more explicit

do you lean on deprecating the scenario object being a callable?

@goodboy
Copy link
Member Author

goodboy commented Dec 31, 2020

@kontsaki yeah, it use of __call__() was from a different "way" of design in younger years.

I wonder if Scenario.run() is just more simple and intuitive.

@kontsaki
Copy link
Contributor

yes it feels like it, since there is a .finalize() coming as well.

@kontsaki
Copy link
Contributor

kontsaki commented Jan 5, 2021

hey @goodboy , what is the current way of running a single specific xml scenario?
i used to work with client/server agents and set the scen_file attribute but apparently that was incorrect cause now it blows up with Internal error, main_scenario already set which i guess makes sense.

@kontsaki
Copy link
Contributor

kontsaki commented Jan 5, 2021

does it make sense to expose ua like client and server ?
edit: just realized i can just pass the scen_file as argument to client/server agents
btw what is the difference between a client and server agent in the context of pysipp ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants