EverydayWechat icon indicating copy to clipboard operation
EverydayWechat copied to clipboard

NameError: name '女朋友' is not defined!!

Open sonack opened this issue 5 years ago • 5 comments

找不到对象,怎么办?

sonack avatar Jun 08 '19 06:06 sonack

new a object.

MikoSecSoS avatar Jun 08 '19 13:06 MikoSecSoS

GF = 女朋友()
while True:
    try:
        GF.dating()
    except GamingInterrupt:
        if GF.is_complaining():
            GF.breakup()
            break
    except CodingInterrupt:
        if not GF.is_complaining():
            continue
        for method in ["sweet words", "hug", "gift"]:
             try:
                  GF.comfort(method)
                  break
             except ComfortError:
                  continue
        else:
            GF.breakup()
            break
del GF #we need to delete GF because she takes too much *memory*

Kyle-Kyle avatar Jun 09 '19 01:06 Kyle-Kyle

没有对象 new 一个嘛(滑稽

taseikyo avatar Jun 11 '19 08:06 taseikyo

GF = 女朋友()
while True:
    try:
        GF.dating()
    except GamingInterrupt:
        if GF.is_complaining():
            GF.breakup()
            break
    except CodingInterrupt:
        if not GF.is_complaining():
            continue
        for method in ["sweet words", "hug", "gift"]:
             try:
                  GF.comfort(method)
                  break
             except ComfortError:
                  continue
        else:
            GF.breakup()
            break
del GF #we need to delete GF because she takes too much *memory*

优秀的代码

zhaoweih avatar Jun 15 '19 07:06 zhaoweih

有点东西

Sagx avatar Jan 08 '20 08:01 Sagx