While everyone is saying what they want in Python :)
David C. Ullrich
ullrich at math.okstate.edu
Tue Feb 6 10:17:05 EST 2001
On Tue, 06 Feb 2001 01:35:02 GMT, "Don Tuttle" <tuttledon at hotmail.com>
>"Jay O'Connor" <joconnor at cybermesa.com> wrote in message
>news:3A7DB154.87E04245 at cybermesa.com...
>> I'm not familiar with the 'with' keyword in Delphi.
>Here's a vbscript example.
> .Height = 2000
> .Width = 2000
> .Caption = "This is MyLabel"
>Personally, I'd love to see Python include the 'with' keyword! It improves
>readability and should execute a bit faster as well.
Delphi's "with" is more or less the same except without the
dots at the start of the field names. For a long time I've
seen Delphi people say that with is bad, the reason
being it leads to bugs
with AnObject do
when AnObject does not have a OneThing method
but there _is_ a OneThing in the surrounding scope.
For years I thought this was just stupid - you should
know what sort of object you're dealing with. The
Python slogans about how explicit is better than
implicit just about have me convinced that
people are right, with is bad.
Right or not, it certainly seems contrary to the
"explciit is better than implicit" philosophy.
More information about the Python-list