Need cleanup advice for multiline string

Discussion in 'Python' started by Robert Dailey, Aug 11, 2009.

  1. Hey guys. Being a C++ programmer, I like to keep variable definitions
    close to the location in which they will be used. This improves
    readability in many ways. However, when I have a multi-line string
    definition at function level scope, things get tricky because of the
    indents. In this case indents are serving two purposes: For syntax and
    actual text output. The tabs for function scope should not be included
    in the contents of the string. Below is the code I am trying to
    improve. Notice how it looks ugly/unreadable because of the way the
    string contents are shifted all the way to the left edge of the
    document. This breaks the flow of scope. Would you guys solve this
    problem by moving failMsg into global scope? Perhaps through some
    other type of syntax?

    Help is appreciated!

    def RunCommand( commandList ):
    commandString =
    print( 'Running Command:', )
    cmd = subprocess.Popen( commandList )
    returnCode = cmd.wait()
    if returnCode:
    failMsg = '''\
    *************************************************
    The following command returned exit code [{:#x}].
    This represents failure of some form. Please review
    the command output for more details on the issue.
    ------------
    {}
    *************************************************
    '''
    commandString = ' '.join( commandList )
    raise CommandFailure( failMsg.format( returnCode,
    commandString ) )
     
    Robert Dailey, Aug 11, 2009
    #1
    1. Advertising

  2. On Aug 11, 3:08 pm, Robert Dailey <> wrote:
    > Hey guys. Being a C++ programmer, I like to keep variable definitions
    > close to the location in which they will be used. This improves
    > readability in many ways. However, when I have a multi-line string
    > definition at function level scope, things get tricky because of the
    > indents. In this case indents are serving two purposes: For syntax and
    > actual text output. The tabs for function scope should not be included
    > in the contents of the string. Below is the code I am trying to
    > improve. Notice how it looks ugly/unreadable because of the way the
    > string contents are shifted all the way to the left edge of the
    > document. This breaks the flow of scope. Would you guys solve this
    > problem by moving failMsg into global scope? Perhaps through some
    > other type of syntax?
    >
    > Help is appreciated!
    >
    > def RunCommand( commandList ):
    >    commandString =
    >    print( 'Running Command:',  )
    >    cmd = subprocess.Popen( commandList )
    >    returnCode = cmd.wait()
    >    if returnCode:
    >       failMsg = '''\
    > *************************************************
    > The following command returned exit code [{:#x}].
    > This represents failure of some form. Please review
    > the command output for more details on the issue.
    > ------------
    > {}
    > *************************************************
    > '''
    >       commandString = ' '.join( commandList )
    >       raise CommandFailure( failMsg.format( returnCode,
    > commandString ) )


    And yes, I recognize there are syntax errors. Ignore those for now.
     
    Robert Dailey, Aug 11, 2009
    #2
    1. Advertising

  3. Robert Dailey wrote:
    > On Aug 11, 3:08 pm, Robert Dailey <> wrote:
    >> Hey guys. Being a C++ programmer, I like to keep variable definitions
    >> close to the location in which they will be used. This improves
    >> readability in many ways. However, when I have a multi-line string
    >> definition at function level scope, things get tricky because of the
    >> indents. In this case indents are serving two purposes: For syntax and
    >> actual text output. The tabs for function scope should not be included
    >> in the contents of the string. Below is the code I am trying to
    >> improve. Notice how it looks ugly/unreadable because of the way the
    >> string contents are shifted all the way to the left edge of the
    >> document. This breaks the flow of scope. Would you guys solve this
    >> problem by moving failMsg into global scope? Perhaps through some
    >> other type of syntax?
    >>
    >> Help is appreciated!
    >>
    >> def RunCommand( commandList ):
    >> commandString =
    >> print( 'Running Command:', )
    >> cmd = subprocess.Popen( commandList )
    >> returnCode = cmd.wait()
    >> if returnCode:
    >> failMsg = '''\
    >> *************************************************
    >> The following command returned exit code [{:#x}].
    >> This represents failure of some form. Please review
    >> the command output for more details on the issue.
    >> ------------
    >> {}
    >> *************************************************
    >> '''
    >> commandString = ' '.join( commandList )
    >> raise CommandFailure( failMsg.format( returnCode,
    >> commandString ) )

    >
    > And yes, I recognize there are syntax errors. Ignore those for now.

    For starters take a look at http://tinyurl.com/o2o8r8 , just about every
    combination of string concatenation going there. I assume that one of
    these will let you leave failMsg where it belongs.

    --
    Kindest regards.

    Mark Lawrence.
     
    Mark Lawrence, Aug 11, 2009
    #3
  4. Robert Dailey

    Bearophile Guest

    Bearophile, Aug 11, 2009
    #4
  5. On Aug 11, 3:40 pm, Bearophile <> wrote:
    > Robert Dailey:
    >
    > > This breaks the flow of scope. Would you guys solve this
    > > problem by moving failMsg into global scope?
    > > Perhaps through some other type of syntax?

    >
    > There are gals too here.
    > This may help:http://docs.python.org/library/textwrap.html#textwrap.dedent
    >
    > Bye,
    > bearophile


    It's a figure of speech. And besides, why would I want programming
    advice from a woman? lol. Thanks for the help.
     
    Robert Dailey, Aug 11, 2009
    #5
  6. Robert Dailey

    Dave Angel Guest

    Robert Dailey wrote:
    > Hey guys. Being a C++ programmer, I like to keep variable definitions
    > close to the location in which they will be used. This improves
    > readability in many ways. However, when I have a multi-line string
    > definition at function level scope, things get tricky because of the
    > indents. In this case indents are serving two purposes: For syntax and
    > actual text output. The tabs for function scope should not be included
    > in the contents of the string. Below is the code I am trying to
    > improve. Notice how it looks ugly/unreadable because of the way the
    > string contents are shifted all the way to the left edge of the
    > document. This breaks the flow of scope. Would you guys solve this
    > problem by moving failMsg into global scope? Perhaps through some
    > other type of syntax?
    >
    > Help is appreciated!
    >
    > def RunCommand( commandList ):
    > commandString =
    > print( 'Running Command:', )
    > cmd = subprocess.Popen( commandList )
    > returnCode = cmd.wait()
    > if returnCode:
    > failMsg = '''\
    > *************************************************
    > The following command returned exit code [{:#x}].
    > This represents failure of some form. Please review
    > the command output for more details on the issue.
    > ------------
    > {}
    > *************************************************
    > '''
    > commandString = ' '.join( commandList )
    > raise CommandFailure( failMsg.format( returnCode,
    > commandString ) )
    >
    >

    No, don't put it in global scope. Put it externally, so it can be
    readily localized for international markets.

    DaveA
     
    Dave Angel, Aug 12, 2009
    #6
  7. 2009/8/11 Robert Dailey <>:
    > On Aug 11, 3:40 pm, Bearophile <> wrote:
    >> There are gals too here.

    >
    > It's a figure of speech. And besides, why would I want programming
    > advice from a woman? lol. Thanks for the help.


    Give the attitudes still prevalent in our industry (cf
    <http://tinyurl.com/c5nqju> and many more), I'm sorry to say that I
    don't think this is funny.

    --
    Cheers,
    Simon B.
     
    Simon Brunning, Aug 12, 2009
    #7
  8. On Tuesday 11 August 2009 22:52:34 Robert Dailey wrote:
    > On Aug 11, 3:40 pm, Bearophile <> wrote:
    > > Robert Dailey:
    > > > This breaks the flow of scope. Would you guys solve this
    > > > problem by moving failMsg into global scope?
    > > > Perhaps through some other type of syntax?

    > >
    > > There are gals too here.
    > > This may
    > > help:http://docs.python.org/library/textwrap.html#textwrap.dedent
    > >
    > > Bye,
    > > bearophile

    >
    > It's a figure of speech. And besides, why would I want programming
    > advice from a woman? lol. Thanks for the help.


    Well it may come as a surprise to you, but it was a woman who
    wrote one of the first compilers.

    She became an Admiral in the US navy as a result.

    If I recall correctly, her name was Grace Hooper.

    How many compilers have you written from scratch,
    without a compiler to help you?

    :)

    - Hendrik
     
    Hendrik van Rooyen, Aug 12, 2009
    #8
  9. Robert Dailey

    MRAB Guest

    Hendrik van Rooyen wrote:
    > On Tuesday 11 August 2009 22:52:34 Robert Dailey wrote:
    >> On Aug 11, 3:40 pm, Bearophile <> wrote:
    >>> Robert Dailey:
    >>>> This breaks the flow of scope. Would you guys solve this
    >>>> problem by moving failMsg into global scope?
    >>>> Perhaps through some other type of syntax?
    >>> There are gals too here.
    >>> This may
    >>> help:http://docs.python.org/library/textwrap.html#textwrap.dedent
    >>>
    >>> Bye,
    >>> bearophile

    >> It's a figure of speech. And besides, why would I want programming
    >> advice from a woman? lol. Thanks for the help.

    >
    > Well it may come as a surprise to you, but it was a woman who
    > wrote one of the first compilers.
    >
    > She became an Admiral in the US navy as a result.
    >
    > If I recall correctly, her name was Grace Hooper.
    >

    Grace Hopper. The saying "It's easier to ask forgiveness than it is to
    get permission" is attributed to her.

    > How many compilers have you written from scratch,
    > without a compiler to help you?
    >
    > :)
    >
     
    MRAB, Aug 12, 2009
    #9
  10. On Aug 12, 9:09 am, wrote:
    > On 01:27 pm, wrote:
    >
    >
    >
    >
    >
    > >Simon Brunning wrote:
    > >>2009/8/11 Robert Dailey <>:
    > >>>On Aug 11, 3:40 pm, Bearophile <> wrote:
    > >>>>There are gals too here.
    > >>>It's a figure of speech. And besides, why would I want programming
    > >>>advice from a woman? lol. Thanks for the help.

    >
    > >>Give the attitudes still prevalent in our industry (cf
    > >><http://tinyurl.com/c5nqju> and many more), I'm sorry to say that I
    > >>don't think this is funny.

    > >Having someone present technical informations with porn content cannot
    > >be qualified as "prevalent in our industry". I would even dare to say
    > >this is the opposite, it is almost unique.
    > >I would also add that Robert was very far from this attitude, I
    > >consider his joke as a friendly tickle, not a male chauvinist
    > >aggression. I'm no women, but I'm sure they are as capable as me, not
    > >to say more, of making the distinction.

    >
    > >It has been said this list is not very friendly to newbies, let's not
    > >make it hostile to gentle jokes (even those not funny) when thanking
    > >helpers.

    >
    > It's lots of little things like this which combine to create an
    > environment which is less friendly towards women than it is towards
    > others.  You might read it as a joke, others might not.  Even if it is a
    > joke, it's in poor taste and doesn't really belong on python-list.
    >
    > There's a difference between pointing out inappropriate behavior and
    > being unfriendly.  Hopefully Robert got help with his problem.  That's
    > what the list is here for.  Having accomplished that, it is not
    > unfriendly to ask him not to make disparaging comments, "jokes" or
    > otherwise, about groups of people.
    >
    > Jean-Paul


    Hey everyone,

    I was actually joking about my remark, I was making fun of the fact
    that Bearophile took my figure of speech literally. I have worked with
    a lot of women in the past and they even use "guys" to refer to
    everyone in a room (When there were obviously other females in that
    room as well).

    On a more serious note, I do apologize to those offended by my remark.
    I realize that these things can be a touchy subject for some people. I
    expected more of a laid-back attitude from everyone. No need to be so
    serious all the time. I cannot completely doubt that there are logical
    women out there. I just haven't seen one yet. But that doesn't mean
    I'm a sexist.

    With my apology presented, I would like to propose that we end the
    discussion here. As I said, this is a very sensitive subject and this
    thread could spin way out of control if we don't just ignore the
    issue. For those that took it as a friendly, harmless joke, hopefully
    you had a laugh. For those that took it seriously or as an offense,
    please take my apology to heart. Thanks once again to everyone for
    your help. I've long been a member of this community and I really
    appreciate the continuous support I've been receiving!

    Take care everyone!
     
    Robert Dailey, Aug 12, 2009
    #10
  11. On Aug 12, 9:41 am, Robert Dailey <> wrote:
    > On Aug 12, 9:09 am, wrote:
    >
    >
    >
    >
    >
    > > On 01:27 pm, wrote:

    >
    > > >Simon Brunning wrote:
    > > >>2009/8/11 Robert Dailey <>:
    > > >>>On Aug 11, 3:40 pm, Bearophile <> wrote:
    > > >>>>There are gals too here.
    > > >>>It's a figure of speech. And besides, why would I want programming
    > > >>>advice from a woman? lol. Thanks for the help.

    >
    > > >>Give the attitudes still prevalent in our industry (cf
    > > >><http://tinyurl.com/c5nqju> and many more), I'm sorry to say that I
    > > >>don't think this is funny.
    > > >Having someone present technical informations with porn content cannot
    > > >be qualified as "prevalent in our industry". I would even dare to say
    > > >this is the opposite, it is almost unique.
    > > >I would also add that Robert was very far from this attitude, I
    > > >consider his joke as a friendly tickle, not a male chauvinist
    > > >aggression. I'm no women, but I'm sure they are as capable as me, not
    > > >to say more, of making the distinction.

    >
    > > >It has been said this list is not very friendly to newbies, let's not
    > > >make it hostile to gentle jokes (even those not funny) when thanking
    > > >helpers.

    >
    > > It's lots of little things like this which combine to create an
    > > environment which is less friendly towards women than it is towards
    > > others.  You might read it as a joke, others might not.  Even if it is a
    > > joke, it's in poor taste and doesn't really belong on python-list.

    >
    > > There's a difference between pointing out inappropriate behavior and
    > > being unfriendly.  Hopefully Robert got help with his problem.  That's
    > > what the list is here for.  Having accomplished that, it is not
    > > unfriendly to ask him not to make disparaging comments, "jokes" or
    > > otherwise, about groups of people.

    >
    > > Jean-Paul

    >
    > Hey everyone,
    >
    > I was actually joking about my remark, I was making fun of the fact
    > that Bearophile took my figure of speech literally. I have worked with
    > a lot of women in the past and they even use "guys" to refer to
    > everyone in a room (When there were obviously other females in that
    > room as well).
    >
    > On a more serious note, I do apologize to those offended by my remark.
    > I realize that these things can be a touchy subject for some people. I
    > expected more of a laid-back attitude from everyone. No need to be so
    > serious all the time. I cannot completely doubt that there are logical
    > women out there. I just haven't seen one yet. But that doesn't mean
    > I'm a sexist.
    >
    > With my apology presented, I would like to propose that we end the
    > discussion here. As I said, this is a very sensitive subject and this
    > thread could spin way out of control if we don't just ignore the
    > issue. For those that took it as a friendly, harmless joke, hopefully
    > you had a laugh. For those that took it seriously or as an offense,
    > please take my apology to heart. Thanks once again to everyone for
    > your help. I've long been a member of this community and I really
    > appreciate the continuous support I've been receiving!
    >
    > Take care everyone!


    Oh, one last thing... So everyone knows, I chose the following
    formatting solution to multiline strings:

    def MyFunction():
    multilineString = (
    'This is a string that spans '
    'multiple lines.'
    )
    print( multilineString )

    I think this is as good as it is going to get for my personal needs.
    However, I do not like having to put a space at the end of each
    string. I've also done this in the past, which is slightly more ugly:

    multilineString = (
    'This is a string that spans',
    'multiple lines.'
    )
    print( ' '.join( multilineString ) )

    This will add the spaces between lines for you. However, in a
    production quality application I would always have strings external to
    the scripts and have an advanced localization system. However this is
    useful for quick little scripts that I want to keep tidy.
     
    Robert Dailey, Aug 12, 2009
    #11
  12. Robert Dailey

    Simon Forman Guest

    On Aug 12, 10:41 am, Robert Dailey <> wrote:
    > On Aug 12, 9:09 am, wrote:
    >
    >
    >
    > > On 01:27 pm, wrote:

    >
    > > >Simon Brunning wrote:
    > > >>2009/8/11 Robert Dailey <>:
    > > >>>On Aug 11, 3:40 pm, Bearophile <> wrote:
    > > >>>>There are gals too here.
    > > >>>It's a figure of speech. And besides, why would I want programming
    > > >>>advice from a woman? lol. Thanks for the help.

    >
    > > >>Give the attitudes still prevalent in our industry (cf
    > > >><http://tinyurl.com/c5nqju> and many more), I'm sorry to say that I
    > > >>don't think this is funny.
    > > >Having someone present technical informations with porn content cannot
    > > >be qualified as "prevalent in our industry". I would even dare to say
    > > >this is the opposite, it is almost unique.
    > > >I would also add that Robert was very far from this attitude, I
    > > >consider his joke as a friendly tickle, not a male chauvinist
    > > >aggression. I'm no women, but I'm sure they are as capable as me, not
    > > >to say more, of making the distinction.

    >
    > > >It has been said this list is not very friendly to newbies, let's not
    > > >make it hostile to gentle jokes (even those not funny) when thanking
    > > >helpers.

    >
    > > It's lots of little things like this which combine to create an
    > > environment which is less friendly towards women than it is towards
    > > others.  You might read it as a joke, others might not.  Even if it is a
    > > joke, it's in poor taste and doesn't really belong on python-list.

    >
    > > There's a difference between pointing out inappropriate behavior and
    > > being unfriendly.  Hopefully Robert got help with his problem.  That's
    > > what the list is here for.  Having accomplished that, it is not
    > > unfriendly to ask him not to make disparaging comments, "jokes" or
    > > otherwise, about groups of people.

    >
    > > Jean-Paul

    >
    > Hey everyone,
    >
    > I was actually joking about my remark, I was making fun of the fact
    > that Bearophile took my figure of speech literally. I have worked with
    > a lot of women in the past and they even use "guys" to refer to
    > everyone in a room (When there were obviously other females in that
    > room as well).
    >
    > On a more serious note, I do apologize to those offended by my remark.
    > I realize that these things can be a touchy subject for some people. I
    > expected more of a laid-back attitude from everyone. No need to be so
    > serious all the time. I cannot completely doubt that there are logical
    > women out there. I just haven't seen one yet. But that doesn't mean
    > I'm a sexist.


    Oh my. And you were doing so well. You haven't seen a logical
    woman? Perhaps you're blind because your eyes were torn out by a
    raging marmoset?

    Guess what? Thinking (or just saying) that /does/ mean you're a
    sexist. (Even if it was just another "friendly, harmless joke".)




    > With my apology presented, I would like to propose that we end the
    > discussion here. As I said, this is a very sensitive subject and this
    > thread could spin way out of control if we don't just ignore the
    > issue. For those that took it as a friendly, harmless joke, hopefully
    > you had a laugh. For those that took it seriously or as an offense,
    > please take my apology to heart. Thanks once again to everyone for
    > your help. I've long been a member of this community and I really
    > appreciate the continuous support I've been receiving!
    >
    > Take care everyone!
     
    Simon Forman, Aug 12, 2009
    #12
  13. On Wed, 12 Aug 2009 07:47:58 -0700, Robert Dailey wrote:

    > On Aug 12, 9:41 am, Robert Dailey <> wrote:

    ....
    > > I was actually joking about my remark, I was making fun of the fact
    > > that Bearophile took my figure of speech literally.


    Keep in mind that the Internet is a global forum, and not everyone here
    speaks English as a first language. I believe Bearophile is one of those.
    Although his, or possibly her, English is excellent, it wouldn't surprise
    me that (s)he would misinterpret "guys" as just referring to men. I'm a
    native English speaker, and I would have done the same.


    > > I have worked with
    > > a lot of women in the past and they even use "guys" to refer to
    > > everyone in a room (When there were obviously other females in that
    > > room as well).


    Yes, I've seen this myself, but it's still uncommon enough to surprise me
    every time I see it.


    > > On a more serious note, I do apologize to those offended by my remark.
    > > I realize that these things can be a touchy subject for some people. I
    > > expected more of a laid-back attitude from everyone. No need to be so
    > > serious all the time. I cannot completely doubt that there are logical
    > > women out there. I just haven't seen one yet.


    That's okay, I haven't seen terribly many logical men out there either.


    > Oh, one last thing... So everyone knows, I chose the following
    > formatting solution to multiline strings:
    >
    > def MyFunction():
    > multilineString = (
    > 'This is a string that spans '
    > 'multiple lines.'
    > )
    > print( multilineString )
    >
    > I think this is as good as it is going to get for my personal needs.
    > However, I do not like having to put a space at the end of each
    > string.


    So put them at the beginning of the next line. It makes the space more
    obvious, so it's clearer what you have done. That's what I sometimes do.


    > I've also done this in the past, which is slightly more ugly:
    >
    > multilineString = (
    > 'This is a string that spans',
    > 'multiple lines.'
    > )
    > print( ' '.join( multilineString ) )



    It's also less efficient, as it does the concatenation at runtime instead
    of compile time. But for a small script, that's not likely to be a
    problem worth worrying about.



    --
    Steven
     
    Steven D'Aprano, Aug 12, 2009
    #13
  14. On Wed, 12 Aug 2009 08:11:43 -0700, Simon Forman wrote:

    [quoting Robert Dailey]
    >> I cannot completely doubt that there are logical
    >> women out there. I just haven't seen one yet. But that doesn't mean I'm
    >> a sexist.

    >
    > Oh my. And you were doing so well. You haven't seen a logical woman?
    > Perhaps you're blind because your eyes were torn out by a raging
    > marmoset?
    >
    > Guess what? Thinking (or just saying) that /does/ mean you're a sexist.
    > (Even if it was just another "friendly, harmless joke".)


    It was an incredibly insensitive thing for Robert to say, having just
    been slapped for a previous insensitive "joke" about women. But still,
    most people, male or female, *aren't* logical. I know I've never met
    somebody who is entirely logical, of either sex, and I'm pretty sure I've
    not met very many people who are even mostly logical. Vulcans we are not.
    Does this mean I'm equally sexist against men *and* women? ("I'm not
    biased, I hate everyone equally!" *wink*)

    Hell, here I am, at 2am, defending somebody I don't know, for saying
    something I don't approve of, against somebody who is saying something I
    agree with, out of some sort of misguided sense of fairness. Logic? Ha,
    what's logic got to do with it?



    --
    Steven
     
    Steven D'Aprano, Aug 12, 2009
    #14
  15. Robert Dailey

    David Bolen Guest

    Robert Dailey <> writes:

    > Hey guys. Being a C++ programmer, I like to keep variable definitions
    > close to the location in which they will be used. This improves
    > readability in many ways. However, when I have a multi-line string
    > definition at function level scope, things get tricky because of the
    > indents. In this case indents are serving two purposes: For syntax and
    > actual text output. The tabs for function scope should not be included
    > in the contents of the string. (...)


    Personally I'm in the camp that something like this should be hoisted
    out of the code path (whether to global scope, a dedicated message
    module or configuration file is a design choice).

    But if it's going to stay inline, one approach that can maintain some
    of the attractive qualities of a triple quoted string is to make use
    of the textwrap module:

    import textwrap

    def RunCommand( commandList ):
    # ...
    if returnCode:
    failMsg = textwrap.dedent('''\
    *************************************************
    The following command returned exit code [{:#x}].
    This represents failure of some form. Please review
    the command output for more details on the issue.
    ------------
    {}
    *************************************************
    ''')

    which removes any common leading whitespace (must be identical in terms
    of any tabs/spaces).

    This is still additional run-time processing, and most likely less
    efficient than the joining of individual strings, but it does permit a
    clean triple-quoted string so IMO is easier to read/maintain in the
    source - providing the code indentation level doesn't get in the way
    of the desired line length of the string. You can also choose to
    dedent the string a bit (say to the level of "failMsg") if needed
    without being forced all the way back to the left margin.

    You can also combine textwrap.dedent with some of the other options if
    where the strings are defined makes it nicer if they still have some
    indentation (say in a global Python module). In that case, you'd most
    likely just process them once when the module was imported, so any
    inefficiency in textwrap.dedent is far less important.

    -- David
     
    David Bolen, Aug 12, 2009
    #15
  16. Robert Dailey

    Aahz Guest

    Diversity in Python (was Re: Need cleanup advice for multiline string)

    In article <>,
    Robert Dailey <> wrote:
    >
    >It's a figure of speech. And besides, why would I want programming
    >advice from a woman? lol. Thanks for the help.


    Well, I'm sorry to see this, it means I was wrong about the lack of
    sexism in the Python community. I encourage anyone who wants to improve
    the situation to join the new diversity list:

    http://mail.python.org/mailman/listinfo/diversity
    --
    Aahz () <*> http://www.pythoncraft.com/

    "I saw `cout' being shifted "Hello world" times to the left and stopped
    right there." --Steve Gonedes
     
    Aahz, Aug 17, 2009
    #16
  17. Grant Edwards wrote:
    > On 2009-08-11, Bearophile <> wrote:
    >
    >> Robert Dailey:
    >>
    >>
    >>> This breaks the flow of scope. Would you guys solve this
    >>> problem by moving failMsg into global scope? Perhaps through
    >>> some other type of syntax?
    >>>

    >> There are gals too here.
    >>

    >
    > Straying a bit OT, but I find this particular issue rather
    > fascinating.
    >
    > At least in the US, "guys" is now pretty much gender-neutral
    > according to my casual research (mostly just paying attention
    > to informal speach).
    >
    > Oddly, it still seems to be masculine when singular. Though one
    > commonly hears a group of females addressed as "you guys" or
    > refered to as "those guys", one never hears a single female
    > referred to as "a guy" or "that guy".
    >
    > It is a bit tricky, however, since a phrase like "a group of
    > guys" still seems to refer to just males since the word "guys"
    > in that case is being applied individually to a plurality of
    > persons rather being applied collectivelly to a single group --
    > if that makes any sense.
    >
    > I've actually discussed this with a a number of female friends,
    > and they almost all thought the term "gals" was condescending
    > and actually preferred to be referred to collectively as
    > "guys".
    >
    >

    I'm no English native, but I already heard women/men referring to a
    group as "guys", no matter that group gender configuration. It's even
    used for group composed exclusively of women. Moreover it looks like a
    *very* friendly form, so there is really nothing to worry about it.

    Forms like:
    "Hi guys", "You guys should do something...", "Come on guys..." are very
    friendly and gender-neutral.

    JM
     
    Jean-Michel Pichavant, Aug 17, 2009
    #17
  18. >>>>> Simon Brunning <> (SB) wrote:

    >SB> 2009/8/11 Robert Dailey <>:
    >>> On Aug 11, 3:40 pm, Bearophile <> wrote:
    >>>> There are gals too here.
    >>>
    >>> It's a figure of speech. And besides, why would I want programming
    >>> advice from a woman? lol. Thanks for the help.


    >SB> Give the attitudes still prevalent in our industry (cf
    >SB> <http://tinyurl.com/c5nqju> and many more), I'm sorry to say that I
    >SB> don't think this is funny.


    seconded
    --
    Piet van Oostrum <>
    URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
    Private email:
     
    Piet van Oostrum, Aug 17, 2009
    #18
  19. Robert Dailey

    Paul Boddie Guest

    Re: Diversity in Python (was Re: Need cleanup advice for multilinestring)

    On 17 Aug, 19:23, Jean-Michel Pichavant <>
    wrote:
    >
    > Are you suggesting this list reject part of the community regarding its
    > sexual orientation, ethnicity, size, culture? If that was the case I'd
    > like to know about it.


    Careful: you probably meant to write "rejects", not "reject". That
    changes the meaning of what you've written somewhat.

    > I would really want to know how you'd guess my gender (could be some
    > clue somewhere), my sexual orientation, my religion and so on.
    > How can you reject someone regarding informations you don't have ?


    Well, everyone can of course hide their actual identity on the
    Internet, but when someone references a group of people with a
    juvenile remark (if we are being charitable about the matter), it has
    nothing to do with guessing the characteristics of individuals. The
    whole excuse that anonymity defends against insults and harassment is
    a bit like saying that slinging mud at everyone is acceptable as long
    as everyone is encouraged to do it and nobody is wearing their nicest
    clothes. And unless your idea of a Python-related conference is
    something close to a fancy-dress event with everyone "in character" -
    which would obviously limit the effectiveness of such an event - you
    presumably understand that there is a genuine need for continuity
    between interactions on and off the Internet. This somewhat undermines
    your argument.

    > That's the beauty of this mailing list, it has diversity, by design.


    An explanation is needed here for this not to sound like
    conversational padding.

    > We even welcome people that mixes up joke with sexist aggression, not to
    > mention how open minded we are :eek:)


    Well, jokes actually need an amusing side, regardless of how
    "edgy" ("juvenile" is typically the more accurate term) the joke-
    teller is trying to be, and that was completely absent from the remark
    in question. There's little room for error in communication over a
    medium like this one, as I pointed out with your opening sentence. And
    much as it probably upsets the "unfettered free speech" advocates, we
    should be able to assert that "sexist aggression" is not acceptable
    behaviour amongst those who seek to participate in our community.

    Paul
     
    Paul Boddie, Aug 17, 2009
    #19
  20. Robert Dailey

    Carl Banks Guest

    On Aug 17, 10:03 am, Jean-Michel Pichavant <>
    wrote:
    > I'm no English native, but I already heard women/men referring to a
    > group as "guys", no matter that group gender configuration. It's even
    > used for group composed exclusively of women. Moreover it looks like a
    > *very* friendly form, so there is really nothing to worry about it.


    I like how being very friendly means calling people after a guy who
    tried to blow up the English Parliament.


    Carl Banks
     
    Carl Banks, Aug 17, 2009
    #20
    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. Danny Shevitz
    Replies:
    3
    Views:
    304
    Danny Shevitz
    Apr 30, 2008
  2. lallous

    Building a multiline string

    lallous, Feb 4, 2010, in forum: Python
    Replies:
    5
    Views:
    613
  3. Suresh Ponraj
    Replies:
    0
    Views:
    127
    Suresh Ponraj
    May 28, 2004
  4. dale zhang
    Replies:
    8
    Views:
    428
    Tintin
    Nov 30, 2004
  5. Peng Yu
    Replies:
    2
    Views:
    138
    Tad J McClellan
    Jun 24, 2008
Loading...

Share This Page