python
Grangerlue
这个作者很懒,什么都没留下…
展开
-
python抽象类
转载 于http://blog.csdn.net/lis_12/article/details/53842299抽象基类要定义抽象基类,需要使用abc模块。该模块定义了一个元类(ABCMeta)和一组装饰器@abstractmethod,@abstractproperty。可以按如下方式使用from abc import ABCMeta,abstractmethod,abs转载 2017-06-12 16:39:46 · 1382 阅读 · 0 评论 -
with关键字用法详解
1.定义 Python’s with statement provides a very convenient way of dealing with the situation where you have to do a setup and teardown to make something happen. A very good example for this is the situ转载 2017-06-12 17:59:28 · 1528 阅读 · 0 评论 -
SQLAlchemy基本技巧
from sqlalchemy import Column, String, create_engine,Float,Integer,DateTime,funcfrom sqlalchemy.orm import sessionmakerfrom sqlalchemy.ext.declarative import declarative_base from sqlalchemy impor转载 2017-06-15 15:32:04 · 309 阅读 · 0 评论