[Python-3000] decorators for variable assignments?
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Sep 22 03:08:53 CEST 2007
On 9/21/07, Arvind Singh <arvind1.singh at gmail.com> wrote:
> @validate_proxy
> proxy = "http://user:passwd@host:port/"
>
> it makes more sense to have the validation
> of a user supplied configuration value at the time of assignment
> rather than leaving the burden of validation on every piece of code
> that uses it.
Why can't you just use a property that does the validation
in its set method?
--
Greg
More information about the Python-3000
mailing list