naming convention for functions that mutate their arguments?

M

mike p.

Hi all,

I was wondering if there was any official/recommended way to denote that a
Python function may mutate one or more of its arguments? I took a glance at
PEP 8, but didn't see anything along these lines. A google search turned up
something similar (
http://aspn.activestate.com/ASPN/Mail/Message/1457714) but I didn't run
across a resolution.

Thanks!
mike
 
T

Terry Reedy

mike p. said:
Hi all,

I was wondering if there was any official/recommended way to denote that a
Python function may mutate one or more of its arguments?

The list mutation methods all return None to remind of this. Otherwise,
read doc strings.

Terry J. Reedy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top