Most elegant way to do something N times

2019-12-22 Thread Batuhan Taskaya
I encounter with cases like doing a function 6 time with no argument, or same arguments over and over or doing some structral thing N times and I dont know how elegant I can express that to the code. I dont know why but I dont like this for _ in range(n): do() thing. Any suggestions? -- https://ma

Re: Fwd: python 8.0

2019-10-25 Thread Batuhan Taskaya
> but python is only up to version 3.8 He probably meant 3.8.0 but there was a python 8 (as an april 1 joke by victor stinner) https://mail.python.org/archives/list/python-...@python.org/thread/4P46WYJTZUKJ2EABQSASI7CD643YY5QL/ On Fri, Oct 25, 2019, 6:32 PM Gene Heskett wrote: > On Friday 25 Oct

Any bad patterns we can find with static analyzing

2019-08-05 Thread Batuhan Taskaya
I am developing a project called Inspector Tiger (from monty python :)) and with that project i am trying to perform a static check over the source code to find common mistakes. If you know a common mistaken pattern, it would be really great to share it with me or implement it and PR to inspector t

Re: Is there a simple way to wrap a built-in function for the whole package?

2019-08-02 Thread Batuhan Taskaya
functools.partial is a better option On Fri, Aug 2, 2019, 1:25 AM Cameron Simpson wrote: > On 31Jul2019 19:16, Jach Fong wrote: > >I get a package from Pypi. The package has many modules using built-in > open() function. I like to redefine all the open() there with the default > encoding 'utf-8