pysipp icon indicating copy to clipboard operation
pysipp copied to clipboard

Does anyone really dislike the __call__ syntax?

Open goodboy opened this issue 5 years ago • 5 comments

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?

goodboy avatar Dec 24 '20 13:12 goodboy

i agree that .run() is more explicit

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

kontsaki avatar Dec 31 '20 16:12 kontsaki

@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.

goodboy avatar Dec 31 '20 18:12 goodboy

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

kontsaki avatar Dec 31 '20 19:12 kontsaki

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 avatar Jan 05 '21 19:01 kontsaki

~~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 ?

kontsaki avatar Jan 05 '21 20:01 kontsaki