Daniel Feldroy 3/13/2026

To return a value or not return a value

Read Original

The article critiques Python's design choice for functions like random.shuffle() that modify data in-place, arguing they should instead return new values. The author presents their preference for immutable operations, discusses a counterargument about performance, and mentions creating a personal package (listo) to address this 'itch' as a fun exercise.

To return a value or not return a value

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser