hg wrote:
> But today ? what is the cost of replacing %w("blah blah") by
> Hi_I_Want_To_Split_The_String_That_Follows( "blah blah")
The latter is beginning to look like the Cocoa/NextStep framework.
Perhaps we should give up scripting languages for ObjC?
James
--
http://mail.python.org/mailman/
Nick Craig-Wood wrote:
> These are snatched straight from perl. In perl they are spelt
> slightly differently
Yup, they are; perl had _some_ good ideas; no doubt. ;)
> In perl (and maybe in ruby I don't know) the { } can be replaced with
> any two identical chars, or the matching pair if bracket
Duncan Booth <[EMAIL PROTECTED]> wrote:
> Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>
> > In python when making __slots__ or module.__all__ you end up typing
> > lists of objects or methods and they turn out like this which is quite
> > a lot of extra typing
> >
> > __slots__ = ["method1", "m
Thorsten Kampe wrote:
> * Antoine De Groote (Tue, 26 Sep 2006 12:06:38 +0200)
>> Thorsten Kampe wrote:
>>> * John Machin (24 Sep 2006 15:32:20 -0700)
Antoine De Groote wrote:
> is there a python equivalent for the ruby %w operator?
> %w{a b c} creates an array with strings "a", "b", an
> hg <[EMAIL PROTECTED]> (A) wrote:
>A> Antoine De Groote wrote:
>>> Hi everybody,
>>>
>>> is there a python equivalent for the ruby %w operator?
>>> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>>>
>>> Thanks a lot
>>> Regards,
>>> antoine
>A> Why would they want to
Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> In python when making __slots__ or module.__all__ you end up typing
> lists of objects or methods and they turn out like this which is quite
> a lot of extra typing
>
> __slots__ = ["method1", "method2", "method3", "method4", "method5"]
>
>
For __
MonkeeSage <[EMAIL PROTECTED]> wrote:
> In ruby there are several special literal notations, just like python.
> In ruby it goes like this:
>
> %{blah} / %Q{blah} # same as "blah" but igornes " and '
> %q{blah} # same as 'blah' but no interpolation
> %w{blah blah} # same as "blah blah".split
* Antoine De Groote (Tue, 26 Sep 2006 12:06:38 +0200)
>Thorsten Kampe wrote:
>> * John Machin (24 Sep 2006 15:32:20 -0700)
>>> Antoine De Groote wrote:
is there a python equivalent for the ruby %w operator?
%w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>>> | >>
Thorsten Kampe wrote:
> * John Machin (24 Sep 2006 15:32:20 -0700)
>> Antoine De Groote wrote:
>>> is there a python equivalent for the ruby %w operator?
>>> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>>>
>> | >>> "a b c".split()
>> | ['a', 'b', 'c']
>>
>> ... appears to m
Antoine De Groote wrote:
> Thorsten Kampe wrote:
>> * John Machin (24 Sep 2006 15:32:20 -0700)
>>> Antoine De Groote wrote:
is there a python equivalent for the ruby %w operator?
%w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>>> | >>> "a b c".split()
>>> | ['a'
MonkeeSage wrote:
> hg wrote:
>> But today ? what is the cost of replacing %w("blah blah") by
>> Hi_I_Want_To_Split_The_String_That_Follows( "blah blah")
>
> How about r'blah', u'blah', """blah""", and '''blah'''. :)
>
> Regards,
> Jordan
>
Some truth to that !
--
http://mail.python.org/mailm
MonkeeSage wrote:
> hg wrote:
>> But today ? what is the cost of replacing %w("blah blah") by
>> Hi_I_Want_To_Split_The_String_That_Follows( "blah blah")
>
> How about r'blah', u'blah', """blah""", and '''blah'''. :)
C'mon, the last two really don't count.
wildemar
--
http://mail.python.org/mai
hg wrote:
> But today ? what is the cost of replacing %w("blah blah") by
> Hi_I_Want_To_Split_The_String_That_Follows( "blah blah")
How about r'blah', u'blah', """blah""", and '''blah'''. :)
Regards,
Jordan
--
http://mail.python.org/mailman/listinfo/python-list
Thorsten Kampe wrote:
> * John Machin (24 Sep 2006 15:32:20 -0700)
>>Antoine De Groote wrote:
>>> is there a python equivalent for the ruby %w operator?
>>> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>>>
>>
>>| >>> "a b c".split()
>>| ['a', 'b', 'c']
>>
>>... appears to ma
hg wrote:
> MonkeeSage wrote:
>> hg wrote:
>>> Why would they want to make such an obscure API ? ... didn't they have
>>> Python to learn from (I am truly amazed - nothing cynical ...just ...
>>> why ?)
>> In ruby there are several special literal notations, just like python.
>> In ruby it goes
* John Machin (24 Sep 2006 15:32:20 -0700)
>Antoine De Groote wrote:
>> is there a python equivalent for the ruby %w operator?
>> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>>
>
>| >>> "a b c".split()
>| ['a', 'b', 'c']
>
>... appears to match your single example.
Somethi
MonkeeSage wrote:
> hg wrote:
>> Why would they want to make such an obscure API ? ... didn't they have
>> Python to learn from (I am truly amazed - nothing cynical ...just ...
>> why ?)
>
> In ruby there are several special literal notations, just like python.
> In ruby it goes like this:
>
hg wrote:
> Why would they want to make such an obscure API ? ... didn't they have
> Python to learn from (I am truly amazed - nothing cynical ...just ...
> why ?)
In ruby there are several special literal notations, just like python.
In ruby it goes like this:
%{blah} / %Q{blah} # same as "b
Antoine De Groote wrote:
> Hi everybody,
>
> is there a python equivalent for the ruby %w operator?
> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>
> Thanks a lot
> Regards,
> antoine
Why would they want to make such an obscure API ? ... didn't they have
Python to learn
Tim Chase wrote:
> to give it that perl/ruby-ish feel of terseness and obscurity.
Don't feel bad, you always have things like r'%s\%s' % (u'blah',
u'blah') and so on. But of course, it's only the other guys who are
evil / ugly / stupid. As the human torch says, "Flame On". :)
[Full disclosure: I
>> is there a python equivalent for the ruby %w operator?
>> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>>
>
> | >>> "a b c".split()
> | ['a', 'b', 'c']
>
> ... appears to match your single example.
bah, far to easy to understand...add a little line-noise, man,
and it
[EMAIL PROTECTED] wrote:
>
> Also Google was curiously resistant to telling me where Ruby's %w is
> documented.
>
You would need to dig into your Google toolbar config and un-tick
"YAGNI filter".
--
http://mail.python.org/mailman/listinfo/python-list
> is there a python equivalent for the ruby %w operator?
> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
The expression 'a b c'.split() creates the ['a', 'b', 'c'] list of str,
if that helps.
Also dir('a b c') briefly lists much of what
http://docs.python.org/lib/string-met
Antoine De Groote wrote:
>
> is there a python equivalent for the ruby %w operator?
> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
>
| >>> "a b c".split()
| ['a', 'b', 'c']
... appears to match your single example.
HTH,
John
--
http://mail.python.org/mailman/listinfo/p
Antoine De Groote wrote:
> Hi everybody,
>
> is there a python equivalent for the ruby %w operator?
> %w{a b c} creates an array with strings "a", "b", and "c" in ruby...
I assume that
['a', 'b', 'c']
isn't what you are looking for. How does
'a b c'.split()
strike you?
--
Robert Kern
Hi everybody,
is there a python equivalent for the ruby %w operator?
%w{a b c} creates an array with strings "a", "b", and "c" in ruby...
Thanks a lot
Regards,
antoine
--
http://mail.python.org/mailman/listinfo/python-list
26 matches
Mail list logo