Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinkedList错误 #11

Closed
BUGLAN opened this issue Jul 7, 2018 · 1 comment
Closed

LinkedList错误 #11

BUGLAN opened this issue Jul 7, 2018 · 1 comment

Comments

@BUGLAN
Copy link

BUGLAN commented Jul 7, 2018

当链表执行完clear方法时 assert list(ll)==[] 错误

AttributeError: 'NoneType' object has no attribute 'value'

应当在iter_node中加入判断

if self.tailnode is None:                                              
    return None

在clear()中加入

self.tailnode = None
PegasusWang added a commit that referenced this issue Jul 10, 2018
@PegasusWang
Copy link
Owner

PegasusWang commented Jul 10, 2018

hi,感谢提出。这里确实有问题。已经修改并补充单测, MR:07ad56e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants