Types returned in python

def error_parse (self, failure):

     id = failure.request.meta["id"]
     self.mongodb.baiduurl.update({"id": id}, {"$push": {"failed_urls": failure.request.url}})
     project = self.mongodb.baiduurl.find_one({"id": id})
     if len(project["successful_urls"]) + len(project["failed_urls"]) < len(project["raw_urls"]):
         return

is this return 0 or 0 by default?

in python, 0 stands for True? 1 stands for false??

Jan.12,2022

should return None.


returns None , where None is not 0, it is a separate object.

you can simply understand the Boolean value represented by the object here: python-master/143559" rel=" nofollow noreferrer "> https://www.kancloud.cn/diges.

.

Question1: is this return 0 or 0 by default? Return does not return a uniform value of None

question 2: in python, 0 stands for True? 1 stands for false?? Answer: 0, 1 are numeric values, True Flase is Boolean attribute value,

I suggest you take a look at this:

print(True)         -sharp True
print(False)        -sharp False
print(1)            -sharp 1
print(0)            -sharp 0

print(True==1)      -sharp True
print(True==2)      -sharp False 1true
print(True==0)      -sharp False
print(False==0)     -sharp True
print(False==2)     -sharp False 0false

the following is the example code of your question:


'''
 def  return  None 
 None PythonNullNone TypeNone.
'''
def abc(w):
    return

print(abc(2))-sharp None
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b55d-2c280.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b55d-2c280.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?