[Zope-CMF] Portal users and some other stuff

Jens Vagelpohl jens at dataflake.org
Fri Jan 12 06:32:59 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 12 Jan 2007, at 12:26, Charlie Clark wrote:

>
> Am 12.01.2007 um 10:13 schrieb Jens Vagelpohl:
>
>> That's a matter of taste. I like explicit, so I prefer the  
>> existing method.
>
> Explicit is better than implicit but I don't see what's wrong with  
> having an explicit list of fields through which to loop, as long as  
> the call is the same as this reduces typos and makes things easier  
> to manage. Of course, exposing all attributes by allowing __get__  
> to be the same as getattr can cause problems for objects that are  
> not simply based on dictionaries.

You don't need to tell me this, it's a matter of taste and if you  
want to do something different in your code please do it :)  If  
you're arguing that the CMF should be changed in this regard than I  
can't help thinking that this is a whole lot of discussion for a tiny  
minute detail and there's a lot more important things that could need  
help and fixing.


>>> I was initially confused that the context was the same as the  
>>> instance of my content-type and didn't support this as I use this  
>>> idiom quite frequently to reduce my typos. Is this too much of an  
>>> edge case to warrant the extension in general (but I'm free to do  
>>> it myself) or perhaps an outdated methodology?
>>
>> I'm not sure what this paragraph means.
>
> It was quite late...
>
> In PythonScripts I quite often use
> context.get('objectname') rather than context.objectname for  
> anything programmatic. It seems to me that there is a case for  
> making certain attributes of content-types available via get so  
> that dispatching can be used where appropriate.

I have a feeling this is another case of personal preference that  
really doesn't make any difference in real life, don't you think? See  
above.

If you have excess programming energy I'd love you to look at open  
CMF collector issues and take on some of them, instead of debating  
small details  ;)

jens




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFp3HrRAx5nvEhZLIRAsnoAJ9kgf1kiGPzvSxeJupSFgCiXHJQ1wCdHVX7
uoOh8xK8X3mbFGs2RJOTvnY=
=2DSu
-----END PGP SIGNATURE-----


More information about the Zope-CMF mailing list