推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
andmspy
V2EX  ›  Python

请问 self.request 是什么意思啊

  •  
  •   andmspy · Mar 28, 2017 · 4611 views
    This topic created in 3522 days ago, the information mentioned may be changed or developed.

    class stock():

    def all_url(self, url):
        html = self.request(url)
    

    这里的 self.request 是什么意思啊? request 应该不是 requests 库里面的方法吧? 还是 urllib.request 里面的意思? 但是我看前面都没用引用 urllib 啊。

    8 replies  •  2017-03-29 09:31:43 +08:00
    twm
    twm
    Mar 28, 2017
    1
    def all_url(self....
    syahd
    syahd
    Mar 28, 2017 via Android
    4
    这是函数在哪个类里面,你就去哪个类找
    Kilerd
    Kilerd
    Mar 28, 2017 via iPhone❤️1
    5
    谁知道 a.b.c 的 b 是什么意思啊?

    是不是平常大家说的那个 b ( doge
    andmspy
    andmspy
    OP
    Mar 28, 2017
    6
    @whwq2012 知道了,谢谢。原来在类的最下面 def 了 request 的函数。
    Perry
    Perry
    Mar 28, 2017 via iPhone
    7
    先弄懂这里的 self 是什么
    1095878620
    1095878620
    Mar 29, 2017 via Android
    8
    @Perry !!!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2100 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 14:51 · PVG 22:51 · LAX 06:51 · JFK 09:51
    ♥ Do have faith in what you're doing.