Alexander Belopolsky writes:
> On Sat, Aug 9, 2014 at 3:08 AM, Stephen J. Turnbull
> wrote:
>
> > All the suggestions
> > I've seen so far are (IMHO, YMMV) just as ugly as the present
> > situation.
> >
>
> What is ugly about allowing strings? CPython certainly has a way to to
> make
Chris Angelico writes:
> The justification is illogical. However, I personally believe
> boilerplate should be omitted where possible;
But it mostly can't be omitted. I wrote 22 classes (all trivial)
yesterday for a Python 3 program. Not one derived directly from
object. That's a bit unusual
Hi Larry,
On 10 August 2014 08:11, Larry Hastings wrote:
>> A small tip from my bzr days - cd into the directory before scanning it
>
> I doubt that's permissible for a library function like os.scandir().
Indeed, chdir() is notably not compatible with multithreading. There
would be a non-portab
On Sun, 10 Aug 2014 13:57:36 +1000, Nick Coghlan wrote:
> On 10 August 2014 13:20, Antoine Pitrou wrote:
> > Le 09/08/2014 12:43, Ben Hoyt a écrit :
> >
> >> Just thought I'd share some of my excitement about how fast the all-C
> >> version [1] of os.scandir() is turning out to be.
> >>
> >> Bel
On Aug 10, 2014, at 05:24 PM, Stephen J. Turnbull wrote:
>Actually ... if I were a fan of the "".join() idiom, I'd seriously
>propose 0.sum(numeric_iterable) as the RightThang{tm]. Then we could
>deprecate "".join(string_iterable) in favor of "".sum(string_iterable)
>(with the same efficient sema
On Sat, Aug 9, 2014 at 8:44 PM, Steven D'Aprano wrote:
> It is certainly required when writing code that will behave the same in
> version 2 and 3
>
This is not true. An alternative is to put
__metaclass__ = type
at the top of your module to make all classes in your module new-style in
python
On Aug 10, 2014, at 11:51 AM, Alexander Belopolsky wrote:
>This is not true. An alternative is to put
>
>__metaclass__ = type
>
>at the top of your module to make all classes in your module new-style in
>python2.
I like this much better, and it's what I do in my own bilingual code. It
makes it
On Sun, Aug 10, 2014 at 11:51:51AM -0400, Alexander Belopolsky wrote:
> On Sat, Aug 9, 2014 at 8:44 PM, Steven D'Aprano wrote:
>
> > It is certainly required when writing code that will behave the same in
> > version 2 and 3
> >
>
> This is not true. An alternative is to put
>
> __metaclass__
On 8/10/2014 1:24 AM, Stephen J. Turnbull wrote:
Actually ... if I were a fan of the "".join() idiom, I'd seriously
propose 0.sum(numeric_iterable) as the RightThang{tm]. Then we could
deprecate "".join(string_iterable) in favor of "".sum(string_iterable)
(with the same efficient semantics).
Act
On Sun, 10 Aug 2014 13:12:26 -0700, Glenn Linderman
wrote:
> On 8/10/2014 1:24 AM, Stephen J. Turnbull wrote:
> > Actually ... if I were a fan of the "".join() idiom, I'd seriously
> > propose 0.sum(numeric_iterable) as the RightThang{tm]. Then we could
> > deprecate "".join(string_iterable) in
On Sun, 10 Aug 2014 13:12:26 -0700, Glenn Linderman
wrote:
> On 8/10/2014 1:24 AM, Stephen J. Turnbull wrote:
> > Actually ... if I were a fan of the "".join() idiom, I'd seriously
> > propose 0.sum(numeric_iterable) as the RightThang{tm]. Then we could
> > deprecate "".join(string_iterable) in
Glenn Linderman writes:
> On 8/10/2014 1:24 AM, Stephen J. Turnbull wrote:
> > Actually ... if I were a fan of the "".join() idiom, I'd seriously
> > propose 0.sum(numeric_iterable) as the RightThang{tm]. Then we could
> > deprecate "".join(string_iterable) in favor of "".sum(string_iterable)
12 matches
Mail list logo