question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add table would be better if it took a list rather than multiple strings as input

See original GitHub issue

Have you checked the issues for a similar suggestions? Yes

How would you improve Rich? The grid system with Tables would be much better if it took a list as input rather than multiple strings.

grid.add_row("Raising shields", "[bold magenta]COMPLETED [green]:heavy_check_mark:")

should be

grid.add_row(["Raising shields", "[bold magenta]COMPLETED [green]:heavy_check_mark:"])

This would be a much more “Pythonic” way to iterate over data and aligns more closely with other libraries such as openpyxl and the csv built in module of Python.

What problem does it solved for you? This will make the library MUCH more easy to use with iterables. which is 99% of the time how people will want to use it. (unless you have a better suggestion or example with using this with a for loop?)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
willmcgugancommented, Nov 30, 2020

Have you ever encountered argument unpacking in Python?

row = ["foo", "bar"] 
table.add_row(*row)
0reactions
thunder-swordcommented, Jul 10, 2022

Have you ever encountered argument unpacking in Python?

row = ["foo", "bar"] 
table.add_row(*row)

thank for your trick, it helpd me!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input multiple string in list - python
Hello so im new on python, i want to know how to do multiple string input on list. I already try to append...
Read more >
Add records to a table by using an append query
An append query selects records from one or more data sources and copies the selected records to an existing table. For example, suppose...
Read more >
Taking multiple inputs from user in Python
In C++/C user can take multiple inputs in one line using scanf ... List comprehension is an elegant way to define and create...
Read more >
How to Take Multiple Inputs From Users In Python
In Python, users can take multiple values or inputs in one line by two methods: Using the split() method; Using List comprehension ...
Read more >
Converting commas or other delimiters to a Table or List in ...
A very common T-SQL needs of database developer is to convert a comma-separated value to list or rows, or any other delimiter into...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found