Coder Social home page Coder Social logo

pypy-llist's People

Contributors

235 avatar ajakubek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pypy-llist's Issues

dllistnode.<prev()|next()> incorrect behaviour

Hey,
Tried the following:

`import pyllist
dllist = pyllist.dllist

a = dllist([2.0])
a.appendleft(1.0)
a.appendright(3.0)
b = a.nodeat(1)
print(b)
c = b.prev()
print(c)`

The documentation makes it sound like next and prev should return the adjacent dllistnodes, but they seem to be returning the value stored in the node instead. Maybe this is intentional, maybe not, but how do I get the node instead of the value? I want to walk along the list!

Incorrect behavior of dllist.remove

The same dllistnode can be removed more than 1 time and decrease the length of dllist. For example

l = dllist([1, 2, 3])
tmp = l.first
l.remove(tmp)
print(len(l))
l.remove(tmp)
print(len(l))
l.remove(tmp)
print(len(l))

The linked list structure is correct but the length is wrong.

Weird dllist behaviour

Hey guys, no idea if this is being maintained still, but here goes. I wanted to use your doubly-linked-list module because I need one for an algorithm. I was doing some tests. Try the following code:

`import pyllist
dllist = pyllist.dllist

a = dllist([2.0])
for i in a:
print(i)
print("\n")
a.appendleft(1.0)
for i in a:
print(i)
print("\n")
a.appendright(3.0)
for i in a:
print(i)`

The output I get is this:
`2.0

1.0
2.0

1.0
3.0`

Where the hell has the 2.0 gone? Weirdly, if I try the same thing after initialising with say [2.0, 4.0], everything is fine. What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.