RE: python gripes survey

Discussion in 'Python' started by sismex01@hebmex.com, Aug 25, 2003.

  1. Guest

    [Afanasiy]
    > Returning a struct in C is
    > easier to deal with than returning a near-mystery tuple in Python.
    >


    You *really* *must* *be* *kidding*.

    -gustavo



    Advertencia:La informacion contenida en este mensaje es confidencial y
    restringida, por lo tanto esta destinada unicamente para el uso de la
    persona arriba indicada, se le notifica que esta prohibida la difusion de
    este mensaje. Si ha recibido este mensaje por error, o si hay problemas en
    la transmision, favor de comunicarse con el remitente. Gracias.
    , Aug 25, 2003
    #1
    1. Advertising

  2. Afanasiy Guest

    On Mon, 25 Aug 2003 13:42:00 -0500, wrote:

    >[Afanasiy]
    >> Returning a struct in C is
    >> easier to deal with than returning a near-mystery tuple in Python.
    >>

    >
    >You *really* *must* *be* *kidding*.


    On the very specific level I was referring to, I really am not kidding.
    Afanasiy, Aug 25, 2003
    #2
    1. Advertising

  3. Afanasiy Guest

    On Mon, 25 Aug 2003 13:42:00 -0500, wrote:

    >[Afanasiy]
    >> Returning a struct in C is
    >> easier to deal with than returning a near-mystery tuple in Python.
    >>

    >
    >You *really* *must* *be* *kidding*.


    Last post on this topic, I knew it would get all retarded.

    Try to figure out what I am actually saying before reading
    "C is easier than Python". Since I cannot explain this well
    enough to satisfy, I am giving up. I will not post again,
    feel free to post your snide personal attacks now hounds.
    Afanasiy, Aug 25, 2003
    #3
  4. Josh Guest

    wrote:
    > [Afanasiy]
    >> Returning a struct in C is
    >> easier to deal with than returning a near-mystery tuple in Python.
    >>


    > You *really* *must* *be* *kidding*.


    > -gustavo


    It's really pretty easy:

    typedef struct {
    int x;
    int y;
    } T;

    T f() {
    T t = { 1, 2 };
    return t;
    }

    int main() {
    T t = f();
    return 0;
    }

    And arguably easier to deal with than Python in that the fields are
    named. I think that's all Afanasiy was getting at.
    Josh, Aug 25, 2003
    #4
  5. In article <>, Afanasiy wrote:
    > On Mon, 25 Aug 2003 13:42:00 -0500, wrote:
    >
    >>[Afanasiy]
    >>> Returning a struct in C is
    >>> easier to deal with than returning a near-mystery tuple in Python.
    >>>

    >>
    >>You *really* *must* *be* *kidding*.

    >
    > Last post on this topic, I knew it would get all retarded.


    Not "all retarded" -- just one post.

    > Try to figure out what I am actually saying before reading "C
    > is easier than Python". Since I cannot explain this well enough
    > to satisfy, I am giving up.


    Relax. Everybody else understood what you wrote. c.l.p is
    better than most groups, but this is Usenet. No matter what you
    write, somebody is going to interpret it as a proposal to cook
    and eat babies.

    > I will not post again, feel free to post your snide personal
    > attacks now hounds.


    --
    Grant Edwards grante Yow! I'm continually
    at AMAZED at th'breathtaking
    visi.com effects of WIND EROSION!!
    Grant Edwards, Aug 25, 2003
    #5
  6. josh> And arguably easier to deal with than Python in that the fields
    josh> are named. I think that's all Afanasiy was getting at.

    Yeah, that was my impression as well. Note that there is a "super tuple"
    type used in some places in the Python C code which allows both positional
    and attribute access to fields:

    >>> import time
    >>> t = time.localtime()
    >>> t

    (2003, 8, 25, 15, 45, 46, 0, 237, 1)
    >>> t.tm_year

    2003
    >>> type(t)

    <type 'time.struct_time'>

    I don't know if the in-memory storage is more like a tuple or more like a
    dict.

    Exposing something like this to the Python programmer was suggested a few
    years ago. I don't recall why it wasn't adopted, though any obvious reason
    might be that it's fairly easy to create container classes for that purpose.

    Skip
    Skip Montanaro, Aug 25, 2003
    #6
  7. Grant> ... this is Usenet. No matter what you write, somebody is going
    Grant> to interpret it as a proposal to cook and eat babies.

    QOTW if ever I saw one. ;-)

    Skip
    Skip Montanaro, Aug 25, 2003
    #7
    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. Geoff Howland

    Re: python gripes survey

    Geoff Howland, Aug 24, 2003, in forum: Python
    Replies:
    7
    Views:
    333
    Colin J. Williams
    Aug 25, 2003
  2. Ryan Lowe

    Re: python gripes survey

    Ryan Lowe, Aug 24, 2003, in forum: Python
    Replies:
    1
    Views:
    307
    John Roth
    Aug 25, 2003
  3. Patrick Lioi

    Re: python gripes survey

    Patrick Lioi, Aug 25, 2003, in forum: Python
    Replies:
    3
    Views:
    306
    Jacek Generowicz
    Aug 25, 2003
  4. Dave Brueck

    Re: python gripes survey

    Dave Brueck, Aug 25, 2003, in forum: Python
    Replies:
    13
    Views:
    502
    Gonçalo Rodrigues
    Aug 28, 2003
  5. Replies:
    3
    Views:
    284
    Ville Vainio
    Aug 26, 2003
Loading...

Share This Page