Argh! Name collision!

Discussion in 'Python' started by Alf P. Steinbach /Usenet, Jul 7, 2010.

  1. Donald Knuth once remarked (I think it was him) that what matters for a program
    is the name, and that he'd come up with a really good name, now all he'd had to
    do was figure out what it should be all about.

    And so considering Sturla Molden's recent posting about unavailability of MSVC
    9.0 (aka Visual C++ 2008) for creating Python extensions in Windows, and my
    unimaginative reply proposing names like "pni" and "pynacoin" for a compiler
    independent Python native code interface, suddenly, as if out of thin air, or
    perhaps out of fish pudding, the name "pyni" occurred to me.

    "pyni"! Pronounced like "tiny"! Yay!

    I sat down and made my first Python extension module, following the tutorial in
    the docs. It worked!

    But, wait, perhaps some other extension is already named "piny"?

    Google.

    <url: http://code.google.com/p/pyni/>, "PyNI is [a] config file reader/writer".

    Argh!


    - Alf

    --
    blog at <url: http://alfps.wordpress.com>
    Alf P. Steinbach /Usenet, Jul 7, 2010
    #1
    1. Advertising

  2. On Jul 7, 3:11 am, "Alf P. Steinbach /Usenet" <alf.p.steinbach
    > wrote:
    > Donald Knuth once remarked (I think it was him) that what matters for a program
    > is the name, and that he'd come up with a really good name, now all he'd had to
    > do was figure out what it should be all about.
    >
    > And so considering Sturla Molden's recent posting about unavailability of MSVC
    > 9.0 (aka Visual C++ 2008) for creating Python extensions in Windows, and my
    > unimaginative reply proposing names like "pni" and "pynacoin" for a compiler
    > independent Python native code interface, suddenly, as if out of thin air, or
    > perhaps out of fish pudding, the name "pyni" occurred to me.
    >
    > "pyni"! Pronounced like "tiny"! Yay!
    >
    > I sat down and made my first Python extension module, following the tutorial in
    > the docs. It worked!
    >
    > But, wait, perhaps some other extension is already named "piny"?
    >
    > Google.
    >
    > <url:http://code.google.com/p/pyni/>, "PyNI is [a] config file reader/writer".
    >
    > Argh!
    >
    > - Alf
    >
    > --
    > blog at <url:http://alfps.wordpress.com>


    PyNI seems to perform the same function as ConfigParser. I prefer the
    pronunciation like tiny to Py-N-I. The latter seems clunky.

    On a possibly related note I was disappointed to discover that
    Python's QT bindings are called PyQT not QTPy. :)

    Chard.
    Richard Thomas, Jul 7, 2010
    #2
    1. Advertising

  3. On 7/6/10 8:25 PM, Shashwat Anand wrote:
    > On Wed, Jul 7, 2010 at 8:21 AM, Richard Thomas <
    > <mailto:>> wrote:
    > On a possibly related note I was disappointed to discover that
    > Python's QT bindings are called PyQT not QTPy. :)
    > Isn't this the standard.
    > Qt -> PyQt
    > crypto -> pycrypto
    > MT -> PyMT


    I think the point is QTPy would be pronounced "cutie pie" :)

    --

    Stephen Hansen
    ... Also: Ixokai
    ... Mail: me+list/python (AT) ixokai (DOT) io
    ... Blog: http://meh.ixokai.io/


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.10 (Darwin)

    iQEcBAEBAgAGBQJMM/X4AAoJEKcbwptVWx/lvN8H/2VARHmiX7eaYJlLj2uwoItc
    3/vgYe7yjCNWhxXbELJAbIYluFz77IgeQEKHnqpRnGaal1DVYz/hE3ZBMxwGIOga
    CQTYv7EVcNQ9soXOKWBTOCJuJYqd6G4ofB1ZTE/+kpAeOFLcYi8VQf12Qwn2o5vW
    T9IS85kT0j3IdNqrTYrtZaSbCbPCZn8EOBY4vhFiEXqM323mJ2q54w8fwHE58Uko
    PCzQHRNeK5rxNIPIzPSM9NCsRUXAldUkIYbtwTPMaFs9j5V6ugktafxSRWVhIkQK
    cJhibZJR5VH7YI32TQyyQ9DozK8Iy/4H8e3n2lHlUOO0//HHefiRXFOcaMyeXIE=
    =UDvN
    -----END PGP SIGNATURE-----
    Stephen Hansen, Jul 7, 2010
    #3
  4. Alf P. Steinbach /Usenet

    rantingrick Guest

    On Jul 6, 9:11 pm, "Alf P. Steinbach /Usenet" <alf.p.steinbach
    > wrote:

    > "pyni"! Pronounced like "tiny"! Yay!


    hmm, how's about an alternate spelling... "pyknee", or "pynee", or
    "pynie" ... considering those are not taken either?
    rantingrick, Jul 7, 2010
    #4
  5. On Tue, 6 Jul 2010 19:51:30 -0700 (PDT), Richard Thomas
    <> declaimed the following in
    gmane.comp.python.general:

    > On a possibly related note I was disappointed to discover that
    > Python's QT bindings are called PyQT not QTPy. :)
    >

    <snort>

    And here I always felt that the HP <> Compaq "merger" should have
    changed their stock listing to HQP (pronounced "hiccup" -- for Hewlett
    ComPa[q|ck]ard)
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Jul 7, 2010
    #5
  6. On Tuesday 06 July 2010 22:42:25 rantingrick wrote:
    > On Jul 6, 9:11 pm, "Alf P. Steinbach /Usenet" <alf.p.steinbach
    >
    > > wrote:
    > > "pyni"! Pronounced like "tiny"! Yay!

    >
    > hmm, how's about an alternate spelling... "pyknee", or "pynee", or
    > "pynie" ... considering those are not taken either?


    Pynie's taken too -- it's the Python implementation on the Parrot VM.

    ----
    Rami Chowdhury
    "As an online discussion grows longer, the probability of a comparison involving
    Nazis or Hitler approaches one." -- Godwin's Law
    +1-408-597-7068 / +44-7875-841-046 / +88-01819-245544
    Rami Chowdhury, Jul 8, 2010
    #6
  7. Alf P. Steinbach /Usenet

    MRAB Guest

    Rami Chowdhury wrote:
    > On Tuesday 06 July 2010 22:42:25 rantingrick wrote:
    >> On Jul 6, 9:11 pm, "Alf P. Steinbach /Usenet" <alf.p.steinbach
    >>
    >> > wrote:
    >>> "pyni"! Pronounced like "tiny"! Yay!

    >> hmm, how's about an alternate spelling... "pyknee", or "pynee", or
    >> "pynie" ... considering those are not taken either?

    >
    > Pynie's taken too -- it's the Python implementation on the Parrot VM.
    >

    "PyNatInt" gets no hits on Google.
    MRAB, Jul 8, 2010
    #7
  8. * rantingrick, on 07.07.2010 07:42:
    > On Jul 6, 9:11 pm, "Alf P. Steinbach /Usenet"<alf.p.steinbach
    > > wrote:
    >
    >> "pyni"! Pronounced like "tiny"! Yay!

    >
    > hmm, how's about an alternate spelling... "pyknee", or "pynee", or
    > "pynie" ... considering those are not taken either?


    Hm, for pure shock value I think I'll use the acronym PYthon Native Interface
    Support.

    pynis! :)

    A set of C++ classes to ease the writing of extensions.

    Like,


    <code file="Ptr.h">
    // progrock.pynis -- "Python Native Interface Support"
    // A simple C++ framework for writing Python 3.x extensions.
    //
    // Copyright (C) Alf P. Steinbach, 2010.

    #ifndef PYNIS_PTR_H
    #define PYNIS_PTR_H
    #include <progrock/cppx/devsupport/better_experience.h>


    //----------------------------------------- Dependencies:

    #include <Python.h>
    #include <assert.h>
    #include <algorithm>



    //----------------------------------------- Interface:

    namespace progrock{ namespace pynis {

    enum DoAddRef { doAddRef };

    class Ptr
    {
    private:
    PyObject* p_;

    public:
    Ptr( PyObject* p = 0 ): p_( p )
    {}

    Ptr( PyObject* p, DoAddRef ): p_( p )
    {
    assert( p != 0 );
    Py_INCREF( p_ );
    }

    Ptr( Ptr const& other ): p_( other.p_ )
    {
    Py_XINCREF( p_ );
    }

    ~Ptr()
    {
    Py_XDECREF( p_ );
    }

    void swapWith( Ptr& other ) { std::swap( p_, other.p_ ); }
    Ptr& operator=( Ptr other ) { swapWith( other ); return *this; }

    PyObject* get() const { return p_; }

    PyObject* release()
    {
    PyObject* const result = p_;
    Py_XDECREF( p_ );
    p_ = 0;
    return result;
    }
    };

    } } // namespace progrock::pynis


    #endif
    </code>


    Cheers,

    - Alf (shocked)

    PS: Darn, forgot to google it. But I think it's unlikely the name's already in use!

    --
    blog at <url: http://alfps.wordpress.com>
    Alf P. Steinbach /Usenet, Jul 8, 2010
    #8
  9. * Alf P. Steinbach /Usenet, on 08.07.2010 01:47:
    >
    > enum DoAddRef { doAddRef };
    >
    > class Ptr
    > {
    > private:
    > PyObject* p_;
    >
    > public:
    > Ptr( PyObject* p = 0 ): p_( p )
    > {}
    >
    > Ptr( PyObject* p, DoAddRef ): p_( p )
    > {
    > assert( p != 0 );
    > Py_INCREF( p_ );
    > }
    >
    > Ptr( Ptr const& other ): p_( other.p_ )
    > {
    > Py_XINCREF( p_ );
    > }
    >
    > ~Ptr()
    > {
    > Py_XDECREF( p_ );
    > }
    >
    > void swapWith( Ptr& other ) { std::swap( p_, other.p_ ); }
    > Ptr& operator=( Ptr other ) { swapWith( other ); return *this; }
    >
    > PyObject* get() const { return p_; }
    >
    > PyObject* release()
    > {
    > PyObject* const result = p_;
    > Py_XDECREF( p_ );


    Hark. This Py_XDECREF shouldn't be there, I don't know how it got there. The
    whole point of 'release', with conventional semantics, is to /not/ decrement the
    reference count.


    > p_ = 0;
    > return result;
    > }
    > };



    Sorry for posting unfinished code,

    - Alf


    PS: "pyni" was a good name. But in use! When I thought about adding the "s" as
    disambiguation I thought the pure shock value of that was funny in a way, but
    now it doesn't seem funny. Is "pytes" (Python Extension Support) a good name?

    --
    blog at <url: http://alfps.wordpress.com>
    Alf P. Steinbach /Usenet, Jul 8, 2010
    #9
  10. On Thu, 08 Jul 2010 04:42:59 +0200, "Alf P. Steinbach /Usenet"
    <> declaimed the following in
    gmane.comp.python.general:


    > PS: "pyni" was a good name. But in use! When I thought about adding the "s" as
    > disambiguation I thought the pure shock value of that was funny in a way, but
    > now it doesn't seem funny. Is "pytes" (Python Extension Support) a good name?


    How about "pyes"... (which reminds me... dinner awaits)
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Jul 8, 2010
    #10
  11. Alf P. Steinbach /Usenet

    rantingrick Guest

    On Jul 7, 6:47 pm, "Alf P. Steinbach /Usenet" <alf.p.steinbach
    > wrote:

    > Hm, for pure shock value I think I'll use the acronym PYthon Native Interface
    > Support.
    >
    > pynis! :)


    Well as long as you don't put your "pynis" *pointers* in "pynie" then
    everything will be Ok! ;-)
    rantingrick, Jul 8, 2010
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike P
    Replies:
    0
    Views:
    3,284
    Mike P
    Jun 19, 2006
  2. Chris Foote

    import module name collision

    Chris Foote, Sep 4, 2004, in forum: Python
    Replies:
    1
    Views:
    364
    Peter Maas
    Sep 6, 2004
  3. Robert Brewer

    RE: import module name collision

    Robert Brewer, Sep 4, 2004, in forum: Python
    Replies:
    0
    Views:
    453
    Robert Brewer
    Sep 4, 2004
  4. Replies:
    6
    Views:
    408
  5. JenC
    Replies:
    1
    Views:
    803
    James Kanze
    Jan 29, 2009
Loading...

Share This Page