Michael P. Soulier wrote:
> > which, based on the law of design based on random sampling of c.l.python,
> > indicates that the current situation is not optimal.
>
> I for one found the move to put join() as a string method _very_
> unintiutive, and rather arbitrary. Lets just be different for the
On 4/30/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> for the record, this just appeared on comp.lang.python:
>
> hello everyone! I can't seem to find a function that combines a list of
> items into a string with a seperator between the individual elements..
>
> which, based on the law of
> Thomas Wouters wrote:
> "I disagree, and I believe that would be a big mistake to change it."
seems to me that Thomas is right here ...
some remarks by a recent arrival at Python, my initial offset was
version 2.4.0: I think cleaning up things to ease newbie adaptation is
often misleading
I vi
Le lundi 01 mai 2006 à 10:57 +0200, Fredrik Lundh a écrit :
> Thomas Wouters wrote:
>
> > > join()
> > >
> > > it's time to make this a builtin. the "it's the separator that's doing
> > > the
> > > joining" idea is silly and unintuitive, and should be fixed.
> >
> >
> > I disagree, and I believe
Nick Coghlan wrote:
> Thomas Wouters wrote:
>> It doesn't matter. Either case is confusing, one way or another, as Tim
>> has already argued. Changing it would be a big mistake. If you want me
>> to come with more comprehensive arguments (other than what Tim already
>> covered), please come with
Nick Coghlan wrote:
> What if the join() builtin had a similar signature to min() & max(), and the
> separator was a keyword only argument?
+0.5 (clever)
___
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/py
Thomas Wouters wrote:
> It doesn't matter. Either case is confusing, one way or another, as Tim
> has already argued. Changing it would be a big mistake. If you want me
> to come with more comprehensive arguments (other than what Tim already
> covered), please come with more comprehensive argume
Thomas Wouters wrote:
> > can anyone point to one other example where "call method on
> > literal" is used in Python ?
>
> It doesn't matter.
it doesn't matter to you when the preferred way to do things don't look
like Python code?
> Either case is confusing, one way or another, as Tim has
> alr
On 5/1/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Thomas Wouters wrote:> > join()> >> > it's time to make this a builtin. the "it's the separator that's doing> > the> > joining" idea is silly and unintuitive, and should be fixed.
>>> I disagree, and I believe that would be a big mistake to chang
Thomas Wouters wrote:
> > join()
> >
> > it's time to make this a builtin. the "it's the separator that's doing
> > the
> > joining" idea is silly and unintuitive, and should be fixed.
>
>
> I disagree, and I believe that would be a big mistake to change it.
big mistake?
can anyone point to one
On 4/27/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
join()it's time to make this a builtin. the "it's the separator that's doing thejoining" idea is silly and unintuitive, and should be fixed.I disagree, and I believe that would be a big mistake to change it.
-- Thomas Wouters <[EMAIL PROTECTED]>
Fredrik Lundh wrote:
> join()
>
> it's time to make this a builtin. the "it's the separator that's doing the
> joining" idea is silly and unintuitive, and should be fixed.
+1
--
Greg
___
Python-3000 mailing list
Python-3000@python.org
http://mail.pyth
Tim Peters wrote:
> Let's see. Should I watch a movie now, or search pre-string-method
> archives for quotes nobody really cares about? While I think about
> that ;-), you could look in _this_ thread for:
well, designing things based on how old farts think things where back
in the old days isn'
Le samedi 29 avril 2006 à 02:07 -0400, Tim Peters a écrit :
> If you don't remember these confusions, I think it should suffice to
> remind that Perl's join() does take the separator first (which is
> essentially forced in Perl, given its odd LIST syntax):
PHP's join does too, also some versions h
[Fredrik]
>>> I don't think anyone on this list can take the "but if there's more than
>>> one argument, *I* am going to be confused" argument seriously.
[Tim]
>> Then you don't remember that the order of arguments here _was_ a
>> frequent confusion in the old days.
[Fredrik]
> nope.
>
> any poin
On Fri, Apr 28, 2006 at 01:02:44AM -0400, Terry Reedy wrote:
>
> "Brett Cannon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I wouldn't want it added without ditching the other two versions as
> > well. Personally I would be fine if string.join() stayed and we
> > considered
Tim Peters wrote:
>> I don't think anyone on this list can take the "but if there's more than
>> one argument, *I* am going to be confused" argument seriously.
>
> Then you don't remember that the order of arguments here _was_ a
> frequent confusion in the old days.
nope.
any pointers ?
__
"Brett Cannon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I wouldn't want it added without ditching the other two versions as
> well. Personally I would be fine if string.join() stayed and we
> considered removing str.join() and just made the string module more
> prominent (af
On 4/27/06, Alex Martelli <[EMAIL PROTECTED]> wrote:
> On 4/27/06, Barry Warsaw <[EMAIL PROTECTED]> wrote:
> > On Thu, 2006-04-27 at 10:08 -0700, Aahz wrote:
> >
> > > While I hate the way it looks, I never have gotten mixed up about the
> > > order of arguments since switching to ''.join(l).
> >
>
On 4/27/06, Tim Peters <[EMAIL PROTECTED]> wrote:
> [Fredrik Lundh]
> > no, because people enjoy writing readable code. doing things by exe-
> > cuting methods attached to literals isn't very readable, and isn't used
> > for anything else.
>
> As Barry often says, he spells it TAB.join() or BLANK.
[Alex Martelli, suggests that a functional join's default
separator be the empty string]
>> Rationale: an emptystring joiner is the most frequent cases, but
>> several others (space, newline, space-comma, ...) occur often enough
>> to be worth allowing the joiner to be optionally specified.
[Barr
On Thu, 2006-04-27 at 10:18 -0700, Alex Martelli wrote:
> > ''.join(seq) == join('', seq)
>
> I think I would prefer a signature of:
> join(seq, joiner='')
Except that I think it would be a mistake to have that and keep
the .join() method on strings because that would increase the confusion
On 4/27/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Phillip J. Eby wrote:
>
> > And thanks to the time machine, str.join('', seq) does this already:
> >
> > Python 2.2.2 (#1, Feb 24 2003, 19:13:11)
> > [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2
> > Type "help", "copyright", "credits"
On Thu, Apr 27, 2006 at 10:18:23AM -0700, Alex Martelli wrote:
> On 4/27/06, Barry Warsaw <[EMAIL PROTECTED]> wrote:
> > On Thu, 2006-04-27 at 10:08 -0700, Aahz wrote:
> >
> > > While I hate the way it looks, I never have gotten mixed up about the
> > > order of arguments since switching to ''.join
Phillip J. Eby wrote:
> And thanks to the time machine, str.join('', seq) does this already:
>
> Python 2.2.2 (#1, Feb 24 2003, 19:13:11)
> [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> str.join('',['a','b','c
[Fredrik Lundh]
> no, because people enjoy writing readable code. doing things by exe-
> cuting methods attached to literals isn't very readable, and isn't used
> for anything else.
As Barry often says, he spells it TAB.join() or BLANK.join() (etc)
instead. That's very readable.
> I don't think
At 07:16 PM 4/27/2006 +0200, Barry Warsaw <[EMAIL PROTECTED]> wrote:
> But hey, yeah, a join() builtin would be fine if it
>took the string arg first, so that
>
>''.join(seq) == join('', seq)
And thanks to the time machine, str.join('', seq) does this already:
Python 2.2.2 (#1, Feb 24 2003, 19:1
Tim Peters wrote:
> > In which case why would we need a builtin?
>
> Because people enjoy arguing about the best order for the arguments,
> and about the best default separator value, neither of which you _can_
> argue about in the method spelling ;-)
no, because people enjoy writing readable cod
[Barry Warsaw]
>> ...
>> While I hate the way it looks, I never have gotten mixed up about the
>> order of arguments since switching to ''.join(l).
[Tim Hochberg]
> Me too on all counts including the -0.
>> ...
>> But hey, yeah, a join() builtin would be fine if it
>> took the string arg first, s
On 4/27/06, Georg Brandl <[EMAIL PROTECTED]> wrote:
> As a side note, I named the thing "string.join()" because I didn't know what
> to
> write. The str type will be dead, and I assume that the new string type will
> have a different name.
>
> Will it be "unicode"? Or "text"? Or "string"?
"str" o
Barry Warsaw wrote:
> On Thu, 2006-04-27 at 10:08 -0700, Aahz wrote:
>> -0
>>
>>
>>While I hate the way it looks, I never have gotten mixed up about the
>>order of arguments since switching to ''.join(l).
Me too on all counts including the -0.
>
>
> Which is why
>
> EMPTYSTRING = ''
>
> ..
On 4/27/06, Barry Warsaw <[EMAIL PROTECTED]> wrote:
> On Thu, 2006-04-27 at 10:08 -0700, Aahz wrote:
>
> > While I hate the way it looks, I never have gotten mixed up about the
> > order of arguments since switching to ''.join(l).
>
> Which is why
>
> EMPTYSTRING = ''
>
> ...
>
> EMPTYSTRING.join(s
On Thu, 2006-04-27 at 10:08 -0700, Aahz wrote:
> While I hate the way it looks, I never have gotten mixed up about the
> order of arguments since switching to ''.join(l).
Which is why
EMPTYSTRING = ''
...
EMPTYSTRING.join(seq)
looks much better. But hey, yeah, a join() builtin would be fine
On Thu, Apr 27, 2006, Raymond Hettinger wrote:
> Ivan Krstic wrote:
>>Fredrik Lundh wrote:
>>>
>>>it's time to make this a builtin. the "it's the separator that's doing the
>>>joining" idea is silly and unintuitive, and should be fixed.
>>
>>+1 on this; I've thought this for a long time.
>
> Stron
Ivan Krstic wrote:
>Fredrik Lundh wrote:
>
>
>>it's time to make this a builtin. the "it's the separator that's doing the
>>joining" idea is silly and unintuitive, and should be fixed.
>>
>>
>
>+1 on this; I've thought this for a long time.
>
>
>
Strong +1.
This fixes a long-standing micr
Fredrik Lundh wrote:
> it's time to make this a builtin. the "it's the separator that's doing the
> joining" idea is silly and unintuitive, and should be fixed.
+1 on this; I've thought this for a long time.
--
Ivan Krstic <[EMAIL PROTECTED]> | GPG: 0x147C722D
__
Georg Brandl wrote:
> As a side note, I named the thing "string.join()" because I didn't know what
> to
> write.
join()
it's time to make this a builtin. the "it's the separator that's doing the
joining" idea is silly and unintuitive, and should be fixed.
_
Nick Coghlan wrote:
> Georg just added the idea of automatically invoking str() in str.join() to
> PEP
> 3100 with a question mark on the end. I thought I'd responded when Talin
> first
> brought it up, but couldn't find a record of that in the archive (this is why
> one suggestion per message
Georg just added the idea of automatically invoking str() in str.join() to PEP
3100 with a question mark on the end. I thought I'd responded when Talin first
brought it up, but couldn't find a record of that in the archive (this is why
one suggestion per message is a good idea ;)
I tried to imp
39 matches
Mail list logo