Create an empty object instance called NoDefault and use that in place of None, allowing None to be passed as a legitimate value.

My 2¢.

        — Alice.

On 2011-02-19 11:53:21 -0800, danjac...@gmail.com said:

As an aside, it would be a good idea to have a constant value instead
of "__no_permission_required__".

On 18 February 2011 17:14, Chris Withers <ch...@simplistix.co.uk> wrote:
On 18/02/2011 16:48, Chris McDonough wrote:

@view_config(context=Blog, name='add_entry.html', permission=None)

...seems an explicit and less cumbersome way of specifying the same
thing, what am I missing?

You're missing the fact that the default value of the permission>> argument to view_config is None, so there's no way to tell that from an
explicit None being passed.

Hmm, I guess I would have chosen to leave the ugliness in the framework code
and replace the default None with a marker object to leave None free for
explicit use, rather than chosing an ugly explicit identifier ;-)

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
          - http://www.simplistix.co.uk

--
You received this message because you are subscribed to the Google Groups
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-devel?hl=en.



--
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to