Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Is there a way to append to a list WITHOUT modifying the parameter passed?
Post: RE: Is there a way to append to a list WITHOUT mod...

Yes, but this requires creating another list for the purpose. Basically, I'm wondering if there is any way to emulate pass-by-value behavior somehow in Python.
arnavb General Coding Help 11 5,729 Sep-16-2018, 06:00 PM
    Thread: Is there a way to append to a list WITHOUT modifying the parameter passed?
Post: Is there a way to append to a list WITHOUT modifyi...

Let's say I have this code: def test(some_args): some_args += ['two'] args = ['one'] test(args) print(args)When I run this code, the output is: Output:['one', 'two']Is there a way to append to ...
arnavb General Coding Help 11 5,729 Sep-14-2018, 11:09 PM
    Thread: OSError: [Errno 13] Permission denied
Post: RE: OSError: [Errno 13] Permission denied

As an alternative, you could also prepend the command with python.
arnavb General Coding Help 3 17,893 Sep-07-2018, 10:39 AM
    Thread: github_unfollower.py - Unfollow users on Github who don't follow you back
Post: RE: github_unfollower.py - Unfollow users on Githu...

Well the primary reason I made this script was to learn about API calls, error handling, etc. Secondly, I saw people making similar scripts for other websites (e.g Twitter, Instagram), I decided why ...
arnavb Code sharing 3 3,845 Sep-07-2018, 10:32 AM
    Thread: github_unfollower.py - Unfollow users on Github who don't follow you back
Post: github_unfollower.py - Unfollow users on Github wh...

This is a random script that I made (posted on Github), which unfollows all the users on Github who don't care enough to follow you back. Here is the script (requires 3.6+) itself (MIT licensed so ju...
arnavb Code sharing 3 3,845 Sep-06-2018, 08:06 PM
    Thread: was Python your 1st or 2nd language?
Post: RE: was Python your 1st or 2nd language?

Python -> JS -> C++ -> back to Python ;P
arnavb Bar 11 6,045 Sep-06-2018, 07:49 PM
    Thread: How does one get reproducible builds for apps on PyPI?
Post: How does one get reproducible builds for apps on P...

Let's say I'm making a CLI script with dependencies in Python that I want to distribute. I have the following options: Distribute the python file standalone. 'Freeze' the code and compile to an exec...
arnavb News and Discussions 0 2,729 Sep-06-2018, 07:44 PM
    Thread: How do I get the info for a cached property?
Post: RE: How do I get the info for a cached property?

Thanks guys! Both of your solutions worked, but @Gribouillis's solution fits my needs better. **biggrin** (Also unrelated question, but does this site have a method of marking threads solved or anyth...
arnavb General Coding Help 3 4,366 Sep-02-2018, 02:26 PM
    Thread: How do I get the info for a cached property?
Post: How do I get the info for a cached property?

Say I have the following class with a property that has an expensive operation: from functools import lru_cache class Example: @property @lru_cache(maxsize=None) def a_getter(self): ...
arnavb General Coding Help 3 4,366 Sep-01-2018, 11:13 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020