python and fellow programming sickos in general: what's your personal opinion/ta...
:: fire_emblem_sickos.jpg :: @aud@spectre.asta.lgbt
python and fellow programming sickos in general: what's your personal opinion/take on functions that modify the input object?
Say I have a function:
```
def get_website_id(website) -> str:
...
website.id = website
return id
```
would you consider that an anti-pattern? It cuts down on bookkeeping at the call site (so that I don't have to manually set the ID every time) and yet, something inside of me is slightly recoiling at the idea that the `website` object is modified as a side effect of the function. Would a better name be a good way to handle it, or just a totally different pattern in general?
#python #programming