"with" elsewhereat 2006-10-08 in Further reading by friebe (0 comments) You might know the with statement from JavaScript or Pascal (where it saves a few keystrokes by "auto-importing" the object).Person.Name= 'Timm'; The XP framework also has with, not really as statement, but as a noop function: <?php You could basically omit with () and the brackets, they serve no purpose except making the above bit more readable (especially when you're using lots of assignments or method calls on an object). Now in Python, with serves a different purpose - in a quite flexible way: What's New in Python 2.5 - The 'with' statement. |
|