Python:AttributeError: 问题
来源:互联网 发布:sql语句添加数值 编辑:程序博客网 时间:2024/06/06 06:40
>>> m=re.match(r'WwW\.(.*)\..{3}','www.python.org')
>>> m.group(1)
Traceback (most recent call last):
File "<pyshell#32>", line 1, in <module>
m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
这个问题是因为WwW这里错了,没有获得对应的值
改为以下代码:
>>> m=re.match(r'www\.(.*)\..{3}','www.python.org')
0 0
- Python:AttributeError: 问题
- Python:AttributeError: 问题
- Python问题分析:AttributeError: module 'sys' has no attribute 'setdefaultencoding'
- python 错误: AttributeError: _strptime
- python AttributeError属性异常
- AttributeError: 'module' object has no attribute 'handlers'--Python子模块导入问题
- AttributeError 'module' object has no attribute 'handlers'--Python子模块导入问题
- Python问题:AttributeError: '_csv.reader' object has no attribute 'next' 以及UnicodeDecodeError: 'gbk' co
- python问题请教:大佬们 AttributeError: 'int' object has no attribute 'save_bullet'
- Python中的AttributeError错误的常见原因
- 用Python和Pygame写游戏---AttributeError
- Python 错误整理:AttributeError: _flags(1)
- 学习Python csv模块遇到AttributeError: module 'csv' has no attribute 'writer'和写入后出现空格问题
- AttributeError: ‘module’ object has no attribute’ 问题
- python __def__ Exception AttributeError: "'NoneType' object has no attribute
- python __def__ Exception AttributeError: "'NoneType' object has no attribute
- [Python][转]Exception AttributeError: "'NoneType' object has no attribute
- Python:AttributeError: 'function' object has no attribute '_doc_'
- Spherical Harmonics Lighting
- Android源代码分析(三) MediaScanner源码分析(下)
- 【Unity3D性能优化】ParticleSyetem的alive (一)
- 正则表达式之group()
- ebtables介绍
- Python:AttributeError: 问题
- 访问url,发生了什么?
- [BZOJ1025][SCOI2009]游戏
- asp.net mvc3 的数据验证(一)
- 信息系统设计评审的工作该如何开展
- python中将string转码为ASCII格式
- Hat’s Words
- Ubuntu 14.04 下安装使用Python rq模块
- Python 参数知识(变量前加星号的意义)