Comments (1)
Hi there.
Removing the uniqueness requirement would be a fairly major undertaking, I'm
afraid. It's not a simple matter of overriding a check which is only there
because I thought it was a good idea. The underlying implementation is based
entirely around dictionaries which have field names as keys, make duplication
in possible. So the change would require not only disabling the check, but a
deep architectural change as well. :/
That's not to say I'll never do it. It seemed like a good idea at the time,
and surprisingly yours is the first complaint I've received about it in several
years of PrettyTable being moderately popular. But not that you do point it
out, I can't convince myself that duplicate field names are NEVER a valid thing
for a table to have. So maybe I'll strive to remove that limitation one day,
but I'm afraid it won't be anytime soon (such as the next release, which is
hopefully only about a week away).
I suppose for the specific case of DB cursor results, I could modify
from_db_cursor to automatically change ["foobar", "foobar", "foobar"] to
["foobar (1)", "foobar (2)", "foobar (3)"] or something like that. Maybe it's
not pretty, but at least it stops the from_db_cursor function from completely
breaking in a perfectly legitimate situation.
Original comment by [email protected]
on 8 Oct 2013 at 11:11
from prettytable.
Related Issues (20)
- the data on "how to display chinese character"
- how to display "ambiguous" width in chinese character?
- table.min_width is broken when using PLAIN_COLUMNS style HOT 2
- Field alignment error when using "blessings" module HOT 1
- Adding colors to column values messes up the spacing HOT 2
- Setting float_format in **kwargs does not actually affect output - confusing behavior HOT 1
- Permissions are incorrect HOT 1
- Add date formatting for datetime etc instances HOT 3
- In get_string, end is eval before sortby
- HTML output is lacking borders, alignment
- Cannot print unicode characters, for example: degree symbol °
- Pandas DataFrame Table Factory HOT 3
- Upload new version to pypi
- xterm reset escape sequence not filtered HOT 2
- Support large tables in output HOT 1
- Prettytable 0.7.2 does not handle rowspan correctly
- Creating a PrettyTable inside a for. HOT 1
- Project Future and Plans HOT 5
- Export project to Github (or other git hosting project) HOT 2
- Stretching columns when the data are longer than the header
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettytable.