explode()

alex23 wuwei23 at gmail.com
Tue Jul 14 02:54:11 EDT 2009


Fred Atkinson <fatkin... at 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.



More information about the Python-list mailing list