Giter VIP home page Giter VIP logo

Comments (6)

markfink avatar markfink commented on July 16, 2024

just to make sure... you refer to a fix but there is no problem related to this? -> so I gave the question label.
from examples/rawlist.py

    {
        'type': 'rawlist',
        'name': 'theme',
        'message': 'What do you want to do?',
        'choices': [
            'Order a pizza',
            'Make a reservation',
            Separator(),
            'Ask opening hours',
            'Talk to the receptionist'
        ]
    },

rawlist uses index numbers to select a choice. Seperators() would make a gap in the numbering so we keep track (with key). key += 1 only for choices (basestrings)

$ python examples/rawlist.py

from whaaaaat.

lelit avatar lelit commented on July 16, 2024

My bad, you're right, who knows what I was thinking, sorry for the noise 😃

from whaaaaat.

lelit avatar lelit commented on July 16, 2024

Ah, I found the glitch: the problem is actually in expand.py, not rawlist.py!

from whaaaaat.

markfink avatar markfink commented on July 16, 2024

now I see, looks like you are right. this is probably a c&p "leftover". Does not look very disturbing but also not very reassuring. Let me take another look with a fresh eye tomorrow. I probably just remove it and see what happens. Thank you for your useful input!

from whaaaaat.

markfink avatar markfink commented on July 16, 2024

fixed with 1e682bc

from whaaaaat.

lelit avatar lelit commented on July 16, 2024

What does it mean when an item in the incoming choices is a plain string, and when can it happen? I ask because I still see the chance that this line being executed before key is assigned...

from whaaaaat.

Related Issues (17)

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.