Message from Python discussions

November 2018

— Because its good

— 

I thought the group was supposed to give opportunity for people to ask their questions. I didn't know that there are limits to the number of times i can share my problem. In that case i don't belong here.

— I know that
i use it for everything but got curious about wget in python
so wanted to try it.
went to pypi but nothing (beside example) was found then i used dir() then opened wget.py in its source🙈🙈

Message permanent page

— Well...

— Https://stackabuse.com/download-files-with-python/

— I mean if someone wants to take a look at other options...

— Sure will look into it

— Just understand that your way of asking questions is incorrect and unproductive

— Bye

— Well then why bother, if it doesnt have docs

— I thought it's some big library 😅😅😜
but i found out it just a simple and small module

— Hi folks.

I've done some research online to find out wether is possible or not to use a decorator for
checking a variable value, but apparently there's nothing easy to find.

The situation is this:

stop_when_6
Class PointlessExample():
self.a = 2
def increase():
for self.a in range(12):
self.a += 2
def success():
print("a is now 6")

Is there a way to create a stop_when_6 decorator that calls the PointlessExample.success method
when the a variable inside the increase method reaches 6 ?

What I've tried to do is this, but it's not working:
def stop_when_6():
def wrapper(*args):
if args[0].a == 6:
args[0].success()

Message permanent page