On Mon, 13 Jul 2009 23:54:11 -0700 (PDT), alex23 <wuwe...@gmail.com> wrote:
>Fred Atkinson <fatkin...@mishmash.com> wrote: >> I wish the Python site was as well written as the PHP site. On >> the PHP site, I can look up a command and they show not only the docs >> on that command but a list of all other commands associated with it. > >Hey Fred, > >My problem is the complete opposite, I wish I could as easily >interrogate objects in PHP about their behaviour as I can Python :) > >In case you're not familiar with this, you can see what methods are >attached to an object using the intepreter via dir() and see the >associated docstring for them via help(). Try looking at 'dir(str)' >for a list of methods that strings recognise, then 'help(str.join)' to >see the help on join. > >This is such a handy ability to have that I miss this casual >introspection in everything else in which I'm required to develop. > >Hope this helps. I appreciate the information. I'm halfway through a course in PHP and Python. We are given assignments and we have to write the assignment in both languages. I'll take a look at that as I work on this week's assignment (I've only got a month to finish the course but I can probably take some time to look at this. Regards, Fred -- http://mail.python.org/mailman/listinfo/python-list