Re: Help understanding code

2005-04-11 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Reading the language tututorial would help you a lot :( === what is the difference between pc and pc()? pc = getToolByName() - returnes a refference to a method Nope. pc is a refference to a method, Nope. pc is not 'a reference to a method', it's a callable object

Re: Help understanding code

2005-04-11 Thread Duncan Booth
Fredrik Lundh wrote: > Dhruva Hein wrote: >>results = pc() >><=== what is the difference between pc and pc()? > > pc refers to an object, pc() calls it. in this case, it looks like pc is > the > portal catalog, and calling the catalog returns the contents. > Unfortunatel

Re: Help understanding code

2005-04-10 Thread elbertlev
Reading the language tututorial would help you a lot :( === what is the difference between pc and pc()? pc = getToolByName() - returnes a refference to a method pc is a refference to a method, pc() is a method invocation. numbers = {"total":len(results),"bytype":{}

Re: Help understanding code

2005-04-10 Thread Fredrik Lundh
Dhruva Hein wrote: > Hi. I am trying to understand a section of code written for Plone and I > am having problems understanding the Python syntax in a few of the > following lines. > > I'd be grateful if someone could help me understand what's happening in > the lines I've marked. I can't see how