Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9268 > unrolled thread
| Started by | John Posner <jjposner@codicesoftware.com> |
|---|---|
| First post | 2011-07-11 13:26 -0400 |
| Last post | 2011-07-11 13:26 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Property setter and lambda question John Posner <jjposner@codicesoftware.com> - 2011-07-11 13:26 -0400
| From | John Posner <jjposner@codicesoftware.com> |
|---|---|
| Date | 2011-07-11 13:26 -0400 |
| Subject | Re: Property setter and lambda question |
| Message-ID | <mailman.911.1310405216.1164.python-list@python.org> |
On 2:59 PM, Anthony Kong wrote:
<snip>
> So the question: is it possible to use lambda expression at all for
> the setter? (As in the last, commented-out line)
>
> Python interpreter will throw an exception right there if I use the
> last line ('SyntaxError: lambda cannot contain assignment'). I'd use
> pass a setter method anyway.
>
> What is your preferred solution?
Anthony, you might take a look at this alternative writeup for
"property", which I placed on the Python Wiki:
http://wiki.python.org/moin/AlternativeDescriptionOfProperty
HTH,
John
Back to top | Article view | comp.lang.python
csiph-web