While everyone is saying what they want in Python :)

gzeljko gzeljko at sezampro.yu
Tue Feb 6 20:31:50 EST 2001


I agree,
but this construct can't go in Python
(what about assigment in this context ?)

Zeljko

Daniel <Daniel.Kinnaer at Advalvas.be> wrote in message
news:3a806c08.26417386 at news.skynet.be...
>
> The part where I find the 'with' command interesting is for
> readability.  Consider :
>
> MySpecialButton := TSpecialButton;
> MySpecialButton.caption := 'Busy';
> MySpecialButton.method2;
> MySpecialButton.caption := "Ok";
>
> or
>
> MySpecialButton := TSpecialButton;
> with MySpecialButton do
> begin
>    caption := 'Busy';
>    method2;
>    caption := 'Done';
> end;
>
> Which code would you prefer?
>






More information about the Python-list mailing list