FAQ
plz can u convert this cpp file into python i need that badly as soon as
possible... I am new to python. I just wanna learn it....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101005/3c425d24/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: std.cpp
URL: <http://mail.python.org/pipermail/python-list/attachments/20101005/3c425d24/attachment.ksh>

Search Discussions

  • James Mills at Oct 6, 2010 at 4:11 am

    On Wed, Oct 6, 2010 at 1:54 PM, wrote:
    plz can u convert this cpp file into python i need that badly as soon as
    possible... I am new to python. I just wanna learn it....
    Should take you 10 minutes to convert this to Python
    assuming you know a little C/C++. Doing this yourself
    will teach you valuable lessons.

    cheers
    James

    --
    -- James Mills
    --
    -- "Problems are solved by method"
  • Jason Swails at Oct 6, 2010 at 4:30 am
    This looks like homework. There's very little to be gained by having an
    anonymous forum poster do your HW for you. (it looks like all it does is
    fill an array from a file, anyway, not terribly difficult). If you want to
    learn python, google the necessary tasks (i.e. opening a file and parsing it
    and manipulating strings). It won't take very long. Alternatively, drop
    the class and take something you'll actually apply effort to.
    On Tue, Oct 5, 2010 at 11:54 PM, wrote:

    plz can u convert this cpp file into python i need that badly as soon as
    possible... I am new to python. I just wanna learn it....

    --
    http://mail.python.org/mailman/listinfo/python-list

    --
    Jason M. Swails
    Quantum Theory Project,
    University of Florida
    Ph.D. Graduate Student
    352-392-4032
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20101006/1c2f04db/attachment-0001.html>
  • Chris Withers at Oct 6, 2010 at 9:31 am

    On 06/10/2010 05:28, Dennis Lee Bieber wrote:
    On Tue, 05 Oct 2010 23:54:00 -0400,<fkrafi at aboutrafi.net23.net>
    declaimed the following in gmane.comp.python.general:
    plz can u convert this cpp file into python i need that badly as soon as
    possible... I am new to python. I just wanna learn it....
    Step one... DON'T TRY TO PORT C++ to Python... the object models are
    quite different.
    Don't be rediculous...

    Chris
  • Hans-Peter Jansen at Oct 6, 2010 at 10:16 am

    On Wednesday 06 October 2010, 06:28:51 Dennis Lee Bieber wrote:
    On Tue, 05 Oct 2010 23:54:00 -0400, <fkrafi at aboutrafi.net23.net>

    declaimed the following in gmane.comp.python.general:
    plz can u convert this cpp file into python i need that badly as soon
    as possible... I am new to python. I just wanna learn it....
    Step one... DON'T TRY TO PORT C++ to Python... the object models are
    quite different.
    I do this all the time without any adverse effects (other than being glad to
    only rarely having the need of doing it the other way around ;-)).

    And the models aren't _that_ different, the syntax is.

    Check yourself:
    http://doc.qt.nokia.com/qtmobility-1.0/lightmaps.html vs.
    http://www.riverbankcomputing.com/pipermail/pyqt/2010-October/028040.html

    Pete
  • Krister Svanlund at Oct 6, 2010 at 7:02 pm

    On Wed, Oct 6, 2010 at 12:16 PM, Hans-Peter Jansen wrote:
    On Wednesday 06 October 2010, 06:28:51 Dennis Lee Bieber wrote:
    On Tue, 05 Oct 2010 23:54:00 -0400, <fkrafi at aboutrafi.net23.net>

    declaimed the following in gmane.comp.python.general:
    plz can u convert this cpp file into python i need that badly as soon
    as possible... I am new to python. I just wanna learn it....
    ? ? ? Step one... DON'T TRY TO PORT C++ to Python... the object models are
    quite different.
    I do this all the time without any adverse effects (other than being glad to
    only rarely having the need of doing it the other way around ;-)).
    I have on occasion translated a few algorithms from python to c++ and
    only needed to spend minimal time pythonize the code. Generally I
    believe that porting from python to c++ and the other way around can
    be done pretty nicely but you always have to take care to restructure
    what has to be restructured.
  • Diez B. Roggisch at Oct 6, 2010 at 7:08 pm

    <fkrafi at aboutrafi.net23.net> writes:

    plz can u convert this cpp file into python i need that badly as soon as possible... I am new to python. I just wanna learn it....
    For such an aspiring student of the art of computer programming, I have
    the strange feeling of lack-of-effort-showing here. Do I have to lose my
    faith in youth?

    Diez
  • Emile van Sebille at Oct 6, 2010 at 8:09 pm
    On 10/6/2010 12:08 PM Diez B. Roggisch said...
    <fkrafi at aboutrafi.net23.net> writes:

    plz can u convert this cpp file into python i need that badly as soon as possible... I am new to python. I just wanna learn it....
    For such an aspiring student of the art of computer programming, I have
    the strange feeling of lack-of-effort-showing here. Do I have to lose my
    faith in youth?

    Oh come now -- isn't being lazy a primary programmer's attribute?

    :)

    Emile
  • Seebs at Oct 6, 2010 at 9:36 pm

    On 2010-10-06, Diez B. Roggisch wrote:
    <fkrafi at aboutrafi.net23.net> writes:
    plz can u convert this cpp file into python i need that badly as soon as possible... I am new to python. I just wanna learn it....
    For such an aspiring student of the art of computer programming, I have
    the strange feeling of lack-of-effort-showing here. Do I have to lose my
    faith in youth?
    Never!

    Just be sure you are having faith in them to, well, be youth. :)

    -s
    --
    Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
    http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
    http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
    I am not speaking for my employer, although they do rent some of my opinions.
  • Diez B. Roggisch at Oct 6, 2010 at 11:05 pm

    Seebs <usenet-nospam at seebs.net> writes:
    On 2010-10-06, Diez B. Roggisch wrote:
    <fkrafi at aboutrafi.net23.net> writes:
    plz can u convert this cpp file into python i need that badly as soon as possible... I am new to python. I just wanna learn it....
    For such an aspiring student of the art of computer programming, I have
    the strange feeling of lack-of-effort-showing here. Do I have to lose my
    faith in youth?
    Never!

    Just be sure you are having faith in them to, well, be youth. :)
    I took the freedom to google a bit. If one can trust people on the
    inter-tubes (and who would have heard you can't?), he's a rather skilled
    student

    http://www.aboutrafi.net23.net/

    With an impressive amount of technological experience under his belt. So
    I'm a bit aghast to see him struggle with this rather simple
    problem. Thus my question...

    Diez
  • Seebs at Oct 6, 2010 at 11:32 pm

    On 2010-10-06, Diez B. Roggisch wrote:
    With an impressive amount of technological experience under his belt. So
    I'm a bit aghast to see him struggle with this rather simple
    problem. Thus my question...
    It does seem a bit odd.

    I mean, if I had a short time line to get something converted to Python,
    I'd probably ask for help, but then, I wouldn't take a gig where I needed to
    quickly move something into an unfamiliar language. I'm happily puttering
    away slowly at converting a couple of things to Python to get the hang of it,
    carefully selecting things with no impending deadlines.

    Thus far, I've converted a shell script to Python. It was... well, shell
    turned out to be a poor language for it, but I do note that the shell
    script, including all the here documents, was quite a bit smaller than the
    Python. On the other hand, I think the Python script is a lot more
    maintainable, and this despite me not really knowing the language particularly
    well. It's an interesting tradeoff. Still getting used to the Python
    way of doing things.

    -s
    --
    Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
    http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
    http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
    I am not speaking for my employer, although they do rent some of my opinions.
  • Diez B. Roggisch at Oct 6, 2010 at 11:43 pm

    Seebs <usenet-nospam at seebs.net> writes:
    On 2010-10-06, Diez B. Roggisch wrote:
    With an impressive amount of technological experience under his belt. So
    I'm a bit aghast to see him struggle with this rather simple
    problem. Thus my question...
    It does seem a bit odd.

    I mean, if I had a short time line to get something converted to Python,
    I'd probably ask for help, but then, I wouldn't take a gig where I needed to
    quickly move something into an unfamiliar language. I'm happily puttering
    away slowly at converting a couple of things to Python to get the hang of it,
    carefully selecting things with no impending deadlines.
    From the look of it... he's just trying to get a freebie on a homework
    assignment. It certainly is no commercial/useful piece of code
    whatsoever... just CS-101 "read data from stdin and do stuff".

    Diez
  • Seebs at Oct 6, 2010 at 11:54 pm

    On 2010-10-06, Diez B. Roggisch wrote:
    From the look of it... he's just trying to get a freebie on a homework
    assignment. It certainly is no commercial/useful piece of code
    whatsoever... just CS-101 "read data from stdin and do stuff".
    Ooh, I should go help, then.

    I *love* to help people on homework. Although I may not know Python
    well enough.

    I once responded to a request for a thing that, given a number, says
    something like "The first digit is 3, the second digit is 2" with a program
    that included a partial table of ln(x) for about 30 values between 0 and
    900... It worked, though!

    -s
    --
    Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
    http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
    http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
    I am not speaking for my employer, although they do rent some of my opinions.
  • Lawrence D'Oliveiro at Oct 11, 2010 at 10:51 am
    In message <mailman.1417.1286438621.29448.python-list at python.org>, Emile van
    Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's attribute?
    I wonder if that?s why more men are good at it than women...
  • Andreas Waldenburger at Oct 11, 2010 at 1:25 pm

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro wrote:

    In message <mailman.1417.1286438621.29448.python-list at python.org>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's attribute?
    I wonder if that?s why more men are good at it than women...
    You may want to think about whether this really was your intended
    meaning.

    /W

    --
    To reach me via email, replace INVALID with the country code of my home
    country. But if you spam me, I'll be one sour Kraut.
  • Jason Swails at Oct 11, 2010 at 1:44 pm

    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In message <mailman.1417.1286438621.29448.python-list at python.org>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's attribute?
    I wonder if that?s why more men are good at it than women...
    You may want to think about whether this really was your intended
    meaning.
    Sure it was -- men are lazy; programmers are primarily lazy; explains why
    programmers are predominantly men (for the time being, at least). Made
    perfect sense to me.

    /W

    --
    To reach me via email, replace INVALID with the country code of my home
    country. But if you spam me, I'll be one sour Kraut.

    --
    http://mail.python.org/mailman/listinfo/python-list
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20101011/b7278755/attachment.html>
  • Robert Kern at Oct 11, 2010 at 3:11 pm

    On 10/11/10 8:44 AM, Jason Swails wrote:

    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In message <mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's attribute?
    I wonder if that?s why more men are good at it than women...
    You may want to think about whether this really was your intended
    meaning.


    Sure it was -- men are lazy; programmers are primarily lazy; explains why
    programmers are predominantly men (for the time being, at least). Made perfect
    sense to me.
    That's quite a different statement than "men are more good at it than women".

    --
    Robert Kern

    "I have come to believe that the whole world is an enigma, a harmless enigma
    that is made terrible by our own mad attempt to interpret it as though it had
    an underlying truth."
    -- Umberto Eco
  • Jason Swails at Oct 11, 2010 at 4:44 pm

    On Mon, Oct 11, 2010 at 11:11 AM, Robert Kern wrote:
    On 10/11/10 8:44 AM, Jason Swails wrote:



    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger
    <usenot at geekmail.invalid>
    wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In message <mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's attribute?
    I wonder if that?s why more men are good at it than women...
    You may want to think about whether this really was your intended
    meaning.


    Sure it was -- men are lazy; programmers are primarily lazy; explains why
    programmers are predominantly men (for the time being, at least). Made
    perfect
    sense to me.
    That's quite a different statement than "men are more good at it than
    women".
    Since when have programmers argued semantics/syntax?

    --
    Robert Kern

    "I have come to believe that the whole world is an enigma, a harmless
    enigma
    that is made terrible by our own mad attempt to interpret it as though it
    had
    an underlying truth."
    -- Umberto Eco

    --
    http://mail.python.org/mailman/listinfo/python-list
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20101011/ab9112c7/attachment-0001.html>
  • Robert Kern at Oct 11, 2010 at 7:05 pm

    On 10/11/10 11:44 AM, Jason Swails wrote:

    On Mon, Oct 11, 2010 at 11:11 AM, Robert Kern <robert.kern at gmail.com
    wrote:

    On 10/11/10 8:44 AM, Jason Swails wrote:



    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger
    wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In message <mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>
    <mailto:mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>>>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's attribute?
    I wonder if that?s why more men are good at it than women...
    You may want to think about whether this really was your intended
    meaning.


    Sure it was -- men are lazy; programmers are primarily lazy; explains why
    programmers are predominantly men (for the time being, at least). Made
    perfect
    sense to me.


    That's quite a different statement than "men are more good at it than women".


    Since when have programmers argued semantics/syntax?
    It's *all* we argue about. That, and tabs vs. spaces.

    --
    Robert Kern

    "I have come to believe that the whole world is an enigma, a harmless enigma
    that is made terrible by our own mad attempt to interpret it as though it had
    an underlying truth."
    -- Umberto Eco
  • Jason Swails at Oct 11, 2010 at 7:11 pm

    On Mon, Oct 11, 2010 at 3:05 PM, Robert Kern wrote:
    On 10/11/10 11:44 AM, Jason Swails wrote:



    On Mon, Oct 11, 2010 at 11:11 AM, Robert Kern <robert.kern at gmail.com
    wrote:

    On 10/11/10 8:44 AM, Jason Swails wrote:



    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger
    <usenot at geekmail.invalid>
    wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In message <
    mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>
    <mailto:mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>>>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's
    attribute?
    I wonder if that?s why more men are good at it than women...
    You may want to think about whether this really was your
    intended
    meaning.


    Sure it was -- men are lazy; programmers are primarily lazy;
    explains why
    programmers are predominantly men (for the time being, at least).
    Made
    perfect
    sense to me.


    That's quite a different statement than "men are more good at it than
    women".


    Since when have programmers argued semantics/syntax?
    Correction: <sarcasm> Since when have programmers argued semantics/syntax?
    </sarcasm>

    It's *all* we argue about. That, and tabs vs. spaces.
    But tabs ARE spaces (specifically 3 of them), in a row ;)


    --
    Robert Kern

    "I have come to believe that the whole world is an enigma, a harmless
    enigma
    that is made terrible by our own mad attempt to interpret it as though it
    had
    an underlying truth."
    -- Umberto Eco

    --
    http://mail.python.org/mailman/listinfo/python-list
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20101011/1cfd234c/attachment.html>
  • Emile van Sebille at Oct 11, 2010 at 7:53 pm
    On 10/11/2010 12:11 PM Jason Swails said...
    But tabs ARE spaces (specifically 3 of them), in a row ;)
    Hoo boy....

    Duckingly,

    Emile
  • Geremy condra at Oct 11, 2010 at 9:14 pm

    On Mon, Oct 11, 2010 at 12:11 PM, Jason Swails wrote:
    On Mon, Oct 11, 2010 at 3:05 PM, Robert Kern wrote:
    On 10/11/10 11:44 AM, Jason Swails wrote:


    On Mon, Oct 11, 2010 at 11:11 AM, Robert Kern <robert.kern at gmail.com
    wrote:

    ? ?On 10/11/10 8:44 AM, Jason Swails wrote:



    ? ? ? ?On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger
    ? ? ? ?<usenot at geekmail.invalid>
    ? ? ? ?wrote:

    ? ? ? ? ? ?On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    ? ? ? ?wrote:

    ? ? ? ? > In message
    <mailman.1417.1286438621.29448.python-list at python.org
    ? ? ? ?<mailto:mailman.1417.1286438621.29448.python-list at python.org>
    ? ? ? ?<mailto:mailman.1417.1286438621.29448.python-list at python.org
    ? ? ? ?<mailto:mailman.1417.1286438621.29448.python-list at python.org>>>,

    ? ? ? ? > Emile van Sebille wrote:
    ? ? ? ? >
    ? ? ? ? > > Oh come now -- isn't being lazy a primary programmer's
    attribute?
    ? ? ? ? >
    ? ? ? ? > I wonder if that?s why more men are good at it than women...

    ? ? ? ? ? ?You may want to think about whether this really was your
    intended
    ? ? ? ? ? ?meaning.


    ? ? ? ?Sure it was -- men are lazy; programmers are primarily lazy;
    explains why
    ? ? ? ?programmers are predominantly men (for the time being, at least).
    ?Made
    ? ? ? ?perfect
    ? ? ? ?sense to me.


    ? ?That's quite a different statement than "men are more good at it than
    women".


    Since when have programmers argued semantics/syntax?
    Correction: <sarcasm> Since when have programmers argued semantics/syntax?
    </sarcasm>
    It's *all* we argue about. That, and tabs vs. spaces.
    But tabs ARE spaces (specifically 3 of them), in a row ;)
    <shudder>

    Geremy Condra
  • Steven D'Aprano at Oct 11, 2010 at 11:17 pm

    On Mon, 11 Oct 2010 10:11:37 -0500, Robert Kern wrote:
    On 10/11/10 8:44 AM, Jason Swails wrote:


    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger
    wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In message <mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's
    attribute?
    I wonder if that?s why more men are good at it than women...
    You may want to think about whether this really was your intended
    meaning.


    Sure it was -- men are lazy; programmers are primarily lazy; explains
    why programmers are predominantly men (for the time being, at least).
    Made perfect sense to me.
    That's quite a different statement than "men are more good at it than
    women".
    But that's not what he said. He said more men are good at programming
    than women.

    "More men are taller than 6'6" than women"

    versus

    "Men are more taller than 6'6" than women"



    --
    Steven
  • Robert Kern at Oct 11, 2010 at 11:30 pm

    On 10/11/10 6:17 PM, Steven D'Aprano wrote:
    On Mon, 11 Oct 2010 10:11:37 -0500, Robert Kern wrote:
    On 10/11/10 8:44 AM, Jason Swails wrote:


    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger
    wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In message<mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's
    attribute?
    I wonder if that?s why more men are good at it than women...
    You may want to think about whether this really was your intended
    meaning.


    Sure it was -- men are lazy; programmers are primarily lazy; explains
    why programmers are predominantly men (for the time being, at least).
    Made perfect sense to me.
    That's quite a different statement than "men are more good at it than
    women".
    But that's not what he said. He said more men are good at programming
    than women.
    I suck at reading, apparently.

    --
    Robert Kern

    "I have come to believe that the whole world is an enigma, a harmless enigma
    that is made terrible by our own mad attempt to interpret it as though it had
    an underlying truth."
    -- Umberto Eco
  • Jorge Biquez at Oct 12, 2010 at 1:04 am

    At 06:30 p.m. 11/10/2010, Robert Kern wrote:
    On 10/11/10 6:17 PM, Steven D'Aprano wrote:
    On Mon, 11 Oct 2010 10:11:37 -0500, Robert Kern wrote:
    On 10/11/10 8:44 AM, Jason Swails wrote:


    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger
    wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In message<mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary programmer's
    attribute?
    I wonder if that???s why more men are good at it than women...
    You may want to think about whether this really was your intended
    meaning.


    Sure it was -- men are lazy; programmers are primarily lazy; explains
    why programmers are predominantly men (for the time being, at least).
    Made perfect sense to me.
    That's quite a different statement than "men are more good at it than
    women".
    But that's not what he said. He said more men are good at programming
    than women.
    I suck at reading, apparently.

    --
    Robert Kern

    "I have come to believe that the whole world is an enigma, a harmless enigma
    that is made terrible by our own mad attempt
    to interpret it as though it had
    an underlying truth."
    -- Umberto Eco

    --
    http://mail.python.org/mailman/listinfo/python-list
    I was a teacher of Computer Sciences for some
    years.... in my case, women were better
    programming than men..... but sure, on the IT
    industry the percentage of men is a lot more than the one of women. Why?

    Jorge Biquez
  • Andreas Waldenburger at Oct 12, 2010 at 4:02 am

    On Mon, 11 Oct 2010 20:04:28 -0500 Jorge Biquez wrote:
    At 06:30 p.m. 11/10/2010, Robert Kern wrote:
    On 10/11/10 6:17 PM, Steven D'Aprano wrote:
    On Mon, 11 Oct 2010 10:11:37 -0500, Robert Kern wrote:
    On 10/11/10 8:44 AM, Jason Swails wrote:


    On Mon, Oct 11, 2010 at 9:25 AM, Andreas Waldenburger
    wrote:

    On Mon, 11 Oct 2010 23:51:46 +1300 Lawrence D'Oliveiro
    wrote:
    In
    message<mailman.1417.1286438621.29448.python-list at python.org
    <mailto:mailman.1417.1286438621.29448.python-list at python.org>>,
    Emile van Sebille wrote:
    Oh come now -- isn't being lazy a primary
    programmer's attribute?
    I wonder if that???s why more men are good at it than
    women...
    You may want to think about whether this really was your
    intended meaning.


    Sure it was -- men are lazy; programmers are primarily lazy;
    explains why programmers are predominantly men (for the time
    being, at least). Made perfect sense to me.
    That's quite a different statement than "men are more good at it
    than women".
    But that's not what he said. He said more men are good at
    programming than women.
    I suck at reading, apparently.

    [snip]
    I was a teacher of Computer Sciences for some
    years.... in my case, women were better
    programming than men..... but sure, on the IT
    industry the percentage of men is a lot more than the one of women.
    Why?
    Remarks like the above are probably not helping.

    /W

    --
    To reach me via email, replace INVALID with the country code of my home
    country. But if you spam me, I'll be one sour Kraut.
  • Lawrence D'Oliveiro at Oct 14, 2010 at 6:54 am
    In message <mailman.1595.1286847515.29448.python-list at python.org>, Jorge
    Biquez wrote:
    I was a teacher of Computer Sciences for some
    years.... in my case, women were better
    programming than men..... but sure, on the IT
    industry the percentage of men is a lot more than the one of women. Why?
    Did you follow up your graduates to see what kind of jobs they ended up
    doing?
  • Steven D'Aprano at Oct 6, 2010 at 10:19 pm

    On Tue, 05 Oct 2010 23:54:00 -0400, fkrafi wrote:

    plz can u convert this cpp file into python i need that badly as soon as
    possible... I am new to python. I just wanna learn it....
    Good grief. It's bad enough to expect us to do your coding for you,
    without making even the *tiniest* effort to learn yourself, but then to
    add insult to injury you use text-speak.

    ur nt sending sms now, learn to rite the wrds

    If you want to learn Python, I suggest you work through some tutorials.
    Google is your friend: google on "python tutorial" and see what comes up.



    --
    Steven
  • Grant Edwards at Oct 7, 2010 at 12:27 am

    On 2010-10-06, Steven D'Aprano wrote:
    On Tue, 05 Oct 2010 23:54:00 -0400, fkrafi wrote:

    plz can u convert this cpp file into python i need that badly as soon as
    possible... I am new to python. I just wanna learn it....
    Good grief. It's bad enough to expect us to do your coding for you,
    without making even the *tiniest* effort to learn yourself, but then to
    add insult to injury you use text-speak.

    ur nt sending sms now, learn to rite the wrds
    LOL!

    I was particularly impressed by the pithy subject line. The extra
    exclamation points are always the hallmark of the clueless and rude.
    If you want to learn Python, I suggest you work through some
    tutorials. Google is your friend: google on "python tutorial" and
    see what comes up.
    --
    Grant
  • Seebs at Oct 7, 2010 at 3:02 am

    On 2010-10-06, <fkrafi at aboutrafi.net23.net> wrote:
    plz can u convert this cpp file into python i need that badly as soon as
    possible... I am new to python. I just wanna learn it....
    Having come to realize that this is a homework problem, I would of course
    be glad to.

    The original program:

    #include<cstdio>

    int main()
    {
    int a[100], n;
    freopen("input.txt", "r", stdin);
    scanf("%d", &n);
    for(int i=1; i<=n; i++)
    scanf("%d", &a[i]);
    return 0;
    }

    So, let's convert this.

    #!/usr/bin/python -w
    import cstdio;

    def main():
    a = [random.randint(-2147483648,2147483647) for i in range(0,100)]
    n = random.randint(-2147483648)
    sys.stdin = open("input.txt", "r")
    raise IndexError

    I'm not sure how much good this will do you. It seems to me that you
    might get better results translating a program which was not obviously
    incorrect.

    -s
    --
    Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
    http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
    http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
    I am not speaking for my employer, although they do rent some of my opinions.
  • John Nagle at Oct 7, 2010 at 5:17 am

    On 10/6/2010 8:02 PM, Seebs wrote:
    On 2010-10-06,<fkrafi at aboutrafi.net23.net> wrote:
    plz can u convert this cpp file into python i need that badly as soon as
    possible... I am new to python. I just wanna learn it....
    Having come to realize that this is a homework problem, I would of course
    be glad to.

    The original program:

    #include<cstdio>

    int main()
    {
    int a[100], n;
    freopen("input.txt", "r", stdin);
    scanf("%d",&n);
    for(int i=1; i<=n; i++)
    scanf("%d",&a[i]);
    return 0;
    }
    This guy doesn't know C very well, either.

    First, "scanf" was deprecated over five years ago.
    And reopening "stdin" is rarely done, although
    it is possible.

    Second, there's a buffer overflow. "n" is obtained
    from external input, then used to control the "for"
    statement. If N is >= 99, there will be a buffer
    overflow on "a". Also, starting to fill "a" from 1
    looks like an error.

    Third, the program doesn't actually do anything.
    There's no output.

    It looks like this approach to C came from

    http://beej.us/guide/bgc/output/html/multipage/freopen.html

    John Nagle
  • Seebs at Oct 7, 2010 at 5:18 am

    On 2010-10-07, John Nagle wrote:
    First, "scanf" was deprecated over five years ago.
    It was? I mean, people have been telling me not to use it since the 80s,
    but I wasn't aware that it had been deprecated, except in the sense of being
    derided and dismissed as of no value.

    -s
    --
    Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
    http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
    http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
    I am not speaking for my employer, although they do rent some of my opinions.
  • Lawrence D'Oliveiro at Oct 11, 2010 at 10:53 am

    In message <slrniaqm69.28f8.usenet-nospam at guild.seebs.net>, Seebs wrote:

    ... but I wasn't aware that it had been deprecated, except in the sense of
    being derided and dismissed as of no value.
    What more did you want? :)
  • Seebs at Oct 11, 2010 at 9:02 pm

    On 2010-10-11, Lawrence D'Oliveiro wrote:
    In message <slrniaqm69.28f8.usenet-nospam at guild.seebs.net>, Seebs wrote:
    ... but I wasn't aware that it had been deprecated, except in the sense of
    being derided and dismissed as of no value.
    What more did you want? :)
    Well, formal "deprecation" in the language standards sense, as in, "warning,
    we will be removing this from future versions of this language". There's a
    difference between something like gets() or tempnam(), where some compilers
    will refuse to link programs which call them, and something like scanf(),
    where I've never heard of a compiler doing anything of the sort.

    -s
    --
    Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
    http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
    http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
    I am not speaking for my employer, although they do rent some of my opinions.
  • Jed Smith at Oct 11, 2010 at 9:23 pm

    On Mon, Oct 11, 2010 at 5:02 PM, Seebs wrote:

    and something like scanf(), where I've never heard of a compiler doing anything of the sort.
    By default, MSVC complains hard enough when using scanf() to make you
    regret it (I think? been a while).

    --
    Jed Smith
    jed at jedsmith.org

Related Discussions

People

Translate

site design / logo © 2018 Grokbase