V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
intohole
V2EX  ›  Python

谁能帮我看看我写的注解问题

  •  
  •   intohole · 2017-12-01 10:20:36 +08:00 · 2230 次点击
    这是一个创建于 2331 天前的主题,其中的信息可能已经有所发展或是发生改变。

    这个是一个 python crontab 实现,但现在问题出线了

    https://github.com/intohole/pyct/blob/master/pyct/pyct.py

    我想使用注解,让这个程序更简单 , 谁能帮我优化下 , 谢谢

    这个不是工作代码,只是因为感觉好玩写的工具类

    第 1 条附言  ·  2017-12-01 12:58:48 +08:00
    应该说明是装饰器问题 ,和 java 搞混了
    6 条回复    2017-12-04 17:39:45 +08:00
    neoblackcap
        1
    neoblackcap  
       2017-12-01 10:52:13 +08:00
    Python 没有注解
    intohole
        2
    intohole  
    OP
       2017-12-01 12:57:11 +08:00
    @neoblackcap 装饰器~ 和 java 搞混了
    goofool
        3
    goofool  
       2017-12-01 14:23:52 +08:00
    能用就行,不用优化,越大白话越好
    intohole
        4
    intohole  
    OP
       2017-12-01 16:19:22 +08:00
    @goofool 嗯 能写出让人看的懂代码是最好的 ~~~
    alber1986
        5
    alber1986  
       2017-12-04 11:29:21 +08:00
    路过一下
    intohole
        6
    intohole  
    OP
       2017-12-04 17:39:45 +08:00
    @alber1986 谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   934 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 20:16 · PVG 04:16 · LAX 13:16 · JFK 16:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.