![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python编程
文章平均质量分 76
shunelly
这个作者很懒,什么都没留下…
展开
-
python map iter
>>> help(map) Help on class map in module builtins: class map(object) | map(func, *iterables) --> map object | | Make an iterator that computes the function using arguments from | e原创 2014-09-17 22:44:54 · 739 阅读 · 0 评论 -
python装饰器
这是在Python学习小组上介绍的内容,现学现卖、多练习是好的学习方式。 第一步:最简单的函数,准备附加额外功能 ? 1 2 3 4 5 6 7 8 # -*- coding:gbk -*- '''示例1: 最简单的函数,表示调用了两次''' def myfunc(): print("myfunc() calle转载 2014-09-18 20:53:52 · 485 阅读 · 0 评论 -
python 解释器
看过python解释器 装饰器模式可以在不影响其他对象的情况下,以动态、透明的方式给单个对象添加职责,也能够处理那些可以撤销的职责。经常用于日志记录、性能测试等场合。 想象一下这个很常见的场景,你写了一个方法只提供给以登陆的用户访问(事实上我也是通过django的@login_required才了解到@修饰符的),你可以写以下代码: [python] view p转载 2014-09-07 00:24:53 · 539 阅读 · 0 评论 -
python+selenium+nose web简单自动化测试框架
os:win7 python:3.3.2 selenium:selenium-2.42.1-py 安装:直接通过setuptools安装selenium就好啦。 selenium2主推的webdriver,是通过调用相应的浏览器驱动来完成浏览器控制的,因此需要安装相应的浏览器驱动。 selenium是一个测试Web应用程序的工具,开源,免费,支持多种浏览器,FireFox,Chrome,原创 2014-09-07 13:08:54 · 4704 阅读 · 0 评论 -
selenium元素定位及常见的表单元素定位
好的工具能让我们省很多事。Firebug,firefox浏览器的一个插件,可以方便的查看html,编辑html,复制html,复制 xpath,以及查看cookie信息等。 Selenium的元素定位主要有以下几种方式。 find_element_by_id() find_element_by_name() find_element_by_class_name() find_elemen原创 2014-09-07 12:41:02 · 11852 阅读 · 0 评论 -
python zip函数同时遍历两个数组和构造字典
>>> help(zip) Help on class zip in module builtins: class zip(object) | zip(iter1 [,iter2 [...]]) --> zip object | | Return a zip object whose .__next__() method returns a tuple where原创 2014-09-17 22:28:28 · 7831 阅读 · 0 评论 -
Iterator和Generator
一直没有太搞明白Iterator和Generator的异同,转载 2014-09-17 23:34:36 · 1133 阅读 · 0 评论