On 8/4/26 9:34 PM, iMark wrote:
Le 2026-08-05 04:02, Mark Sapiro a écrit :
In Python, block structure is defined by indentation which is
critical. In interactive mode, a `>>> ` prompt indicates you are at
the outer level and a `... ` prompt indicates you are in a block.
The complete interaction should look like
```
for member in m.members.members:
... if member.delivery_mode != DeliveryMode.regular: ...
member.delivery_mode = DeliveryMode.plaintext_digests
...
commit()
```
Note the above has a formatting error. See my followup post correcting that.
I got to the last line ( member.delivery_mode =
DeliveryMode.plaintext_digests ) and entered it to then get the ellipsis
(as you've shown).
What happens after that so I can get back to the outer level (>>>>) and
commit ?
If I hit Enter, I get this error
Enter is the appropriate thing. It then runs the block.
...
Traceback (most recent call last):
File "<console>", line 3, in <module>
AttributeError: property 'delivery_mode' of 'Member' object has no setter
And upon running the block it encounters the above error. Unfortunately
when I tested this, I tested on a list with only regular members and
didn't encounter the error.
The last line
```
member.delivery_mode = DeliveryMode.plaintext_digests
```
needs to be
```
member.preferences.delivery_mode = DeliveryMode.plaintext_digests
```
--
Mark Sapiro <[email protected]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
_______________________________________________
Mailman-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at:
https://lists.mailman3.org/archives/list/[email protected]/message/GIITQGNSAGQGKTCUSUVVL5XWMUNABINR/
This message sent to [email protected]