<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 01/07/2011 11:59 AM, Jakub Hrozek wrote:
    <blockquote cite="mid:4D274667.10808@redhat.com" type="cite">On
      01/07/2011 05:28 PM, Adam Young wrote:
      <br>
      <blockquote type="cite">I'm Not a pythonista. What is this line
        doing?
        <br>
        <br>
        <br>
        On 01/07/2011 10:58 AM, Jakub Hrozek wrote:
        <br>
        <blockquote type="cite">+ nameserver = nameserver[-1] == '.' and
          nameserver or nameserver + '.'
          <br>
        </blockquote>
        <br>
      </blockquote>
      <br>
      This construct is called the 'and-or trick' and somewhat resembles
      ternary operator (which was added to python in 2.7 IIRC, so I'm
      not sure if it's old enough to use) from C and other languages.
      See
      <a class="moz-txt-link-freetext" href="http://diveintopython.org/power_of_introspection/and_or.html#d0e9975">http://diveintopython.org/power_of_introspection/and_or.html#d0e9975</a>
      for details.
      <br>
      <br>
      But yeah, a simple if would be more readable. A new patch is
      attached, thanks for bringing it up.
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Freeipa-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a></pre>
    </blockquote>
    ACK<br>
  </body>
</html>