Giter VIP home page Giter VIP logo

Comments (1)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 18, 2024
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)

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.