<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 21, 2015 at 11:38 AM, Alexander Belopolsky <span dir="ltr"><<a href="mailto:alexander.belopolsky@gmail.com" target="_blank">alexander.belopolsky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 2:13 PM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Lack of a use case?</blockquote></div><br></span>My use case comes from interoperability with other languages.  I maintain a package which provides an interface [1] between Python and the language [2] called Q.  Q has 3 scalar types to represent text data (char, byte and symbol) and the corresponding vector types.  When I pass Python strings to Q, I convert them to symbols because that is what users expect most of the time, but as a result, working with char vectors is unnatural. </div></div></blockquote><div><br></div><div>couldn't you create a subclass of str that was exactly the same except that it was defined as mapping to a Q symbol?</div><div><br></div><div>-Chris</div></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>