This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
标题: ElementTree/cElementTree findtext inconsistency
类型: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
状态: closed Resolution: duplicate
Dependencies: 后续: Update ElementTree with upstream changes
View: 6472
分配给: effbot 抄送列表: effbot, flox, gmonroe, loewis
优先级: normal 关键字:

Created on 2008-01-09 18:58 by gmonroe, last changed 2022-04-11 14:56 by admin. This issue is now closed.

文件
文件名 上传时间 Description 编辑
etree_test.py gmonroe, 2008-01-09 18:58 a simple example demonstrating the inconsistency
Messages (5)
msg59618 - (view) Author: Grant Monroe (gmonroe) 日期: 2008-01-09 18:58
cElementTree findtext seems to return None when it should return a string.
msg59620 - (view) Author: Martin v. Löwis (loewis) * (Python committer) 日期: 2008-01-09 19:22
Fredrik, can you take a look?
msg59621 - (view) Author: Fredrik Lundh (effbot) * (Python committer) 日期: 2008-01-09 19:35
Looks like the mechanisms used decide when to invoke the full
ElementPath machinery differs somewhat.  I've added this to the TODO
list for ET 1.3; in the meantime, my advice is "don't do that".

(adding a check for '.' to the PATHCHAR macro should fix this, I think.)
msg79561 - (view) Author: Fredrik Lundh (effbot) * (Python committer) 日期: 2009-01-10 17:43
Forgot to mention that this is fixed in the cElementTree trunk (public
as of today's 1.0.6 preview release).  Will merge with Python trunk when
I find the time...
msg99396 - (view) Author: Florent Xicluna (flox) * (Python committer) 日期: 2010-02-16 11:46
Should be fixed with the next upstream merge. See #6472
历史
日期 用户 动作 参数
2022-04-11 14:56:29admin修改github: 46110
2010-02-16 11:46:13flox修改状态: open -> closed

抄送: + flox
消息: + msg99396

后续: Update ElementTree with upstream changes
resolution: duplicate
2009-01-10 17:43:35effbot修改消息: + msg79561
2008-01-09 19:35:48effbot修改优先级: normal
消息: + msg59621
2008-01-09 19:22:13loewis修改assignee: effbot
消息: + msg59620
抄送: + loewis, effbot
2008-01-09 18:58:07gmonroe创建