Tim Daneliuk wrote:
> On 08/02/2017 10:05 AM, Daiyue Weng wrote:
>> Hi, I am trying to removing extra quotes from a large set of strings (a
>> list of strings), so for each original string, it looks like,
>>
>> """str_value1"",""str_value2"",""str_value3"",1,""str_value4"""
>>
>>
>> I like to r
Sorry Daiyue,
Try this correction: I'm writing code without being able to execute it.
> split_on_dbl_dbl_quote = original_list.join('|').split('""')
> remove_dbl_dbl_quotes_and_outer_quotes =
> split_on_dbl_dbl_quote[::2].join('').split('|')
split_on_dbl_dbl_quote = original_list.join('|').sp
On 08/02/2017 10:05 AM, Daiyue Weng wrote:
> Hi, I am trying to removing extra quotes from a large set of strings (a
> list of strings), so for each original string, it looks like,
>
> """str_value1"",""str_value2"",""str_value3"",1,""str_value4"""
>
>
> I like to remove the start and end quotes
Hi,
Pyro4 (http://pyro4.readthedocs.io) allows you to call methods on Python
objects running
on other machines, as if they were just normal local objects.
Regarding the network communication: it hasn't got any real security mechanisms
built-in
and always explicitly depended on external tools or
On Thu, Aug 3, 2017 at 12:17 PM, Ian Kelly wrote:
> On Thu, Aug 3, 2017 at 11:18 AM, Serhiy Storchaka wrote:
>> $ ./python -m timeit -s 'import sys; sys.modules["_functools"] = None; del
>> sys.modules["functools"]; from functools import lru_cache; f =
>> lru_cache(maxsize=None)(int)' -- 'f()'
>>
On Thu, Aug 3, 2017 at 11:18 AM, Serhiy Storchaka wrote:
> $ ./python -m timeit -s 'import sys; sys.modules["_functools"] = None; del
> sys.modules["functools"]; from functools import lru_cache; f =
> lru_cache(maxsize=None)(int)' -- 'f()'
> 10 loops, best of 5: 3.39 usec per loop
Interesting
03.08.17 19:08, Ian Kelly пише:
This turns out to be because I was running 3.4 which doesn't have the
C implementation to begin with. In 3.6 this trick doesn't seem to work
as expected for disabling it:
It didn't work because the functools module already was imported at startup.
$ ./python -m
On Thu, Aug 3, 2017 at 10:02 AM, Ian Kelly wrote:
> Fixed:
>
> $ python3 -m timeit -s 'from simple_cache import simple_cache; f =
> simple_cache(int)' -- 'f()'
> 100 loops, best of 3: 0.167 usec per loop
> $ python3 -m timeit -s 'import sys; sys.modules["_functools"] = None;
> from functools i
On Thu, Aug 3, 2017 at 9:55 AM, Serhiy Storchaka wrote:
> 03.08.17 18:36, Ian Kelly пише:
>>
>> The single variable is only a dict lookup if it's a global. Locals and
>> closures are faster.
>>
>> def simple_cache(function):
>> sentinel = object()
>> cached = sentinel
>>
>> @functoo
On Thu, Aug 3, 2017 at 9:44 AM, wrote:
> I hope you washed them!
Yes, well as noted in my followup I was comparing pure-Python
implementations, not the C implementation.
--
https://mail.python.org/mailman/listinfo/python-list
03.08.17 18:36, Ian Kelly пише:
The single variable is only a dict lookup if it's a global. Locals and
closures are faster.
def simple_cache(function):
sentinel = object()
cached = sentinel
@functools.wraps(function)
def wrapper(*args, **kwargs):
nonlocal cached
On Thursday, 3 August 2017 16:37:22 UTC+1, Ian wrote:
> On Thu, Aug 3, 2017 at 8:35 AM, Paul Moore ...@gmail.com> wrote:
> > On Tuesday, 1 August 2017 15:54:42 UTC+1, t...@tomforb.es wrote:
> >> > _sentinel = object()
> >> > _val = _sentinel
> >> > def val():
> >> > if _val is _sentinel:
> >
On Thu, Aug 3, 2017 at 9:36 AM, Ian Kelly wrote:
> On Thu, Aug 3, 2017 at 8:35 AM, Paul Moore wrote:
>> On Tuesday, 1 August 2017 15:54:42 UTC+1, t...@tomforb.es wrote:
>>> > _sentinel = object()
>>> > _val = _sentinel
>>> > def val():
>>> > if _val is _sentinel:
>>> > # Calculate _
On Thu, Aug 3, 2017 at 8:35 AM, Paul Moore wrote:
> On Tuesday, 1 August 2017 15:54:42 UTC+1, t...@tomforb.es wrote:
>> > _sentinel = object()
>> > _val = _sentinel
>> > def val():
>> > if _val is _sentinel:
>> > # Calculate _val
>> > return _val
>> >
>> > seems entirely sufficie
On Tuesday, 1 August 2017 15:54:42 UTC+1, t...@tomforb.es wrote:
> > _sentinel = object()
> > _val = _sentinel
> > def val():
> > if _val is _sentinel:
> > # Calculate _val
> > return _val
> >
> > seems entirely sufficient for this case. Write a custom decorator if you
> > use th
attend 께서 쓰시길,
《記事 全文 에서》:
> On Thu, 27 Jul 2017 10:03:29 +0900, Byung-Hee HWANG (황병희, 黃炳熙) wrote:
>
>> my computer is chromebook. how can i install python in chromebook?
>> barely i did meet develop mode of chromebook. also i'm new to python.
>>
>> INDEED, i want to make python code on my chr
On 2017-08-02 19:05, MRAB wrote:
> On 2017-08-02 16:05, Daiyue Weng wrote:
>> Hi, I am trying to removing extra quotes from a large set of strings (a
>> list of strings), so for each original string, it looks like,
>>
>> """str_value1"",""str_value2"",""str_value3"",1,""str_value4"""
>>
>>
>> I lik
I remove red line
and capture another version
https://gist.github.com/hoyeunglee/99bbe7999bc489a79ffdf0277e80ecb6
it can capture words in windows, but since window words some are black
and some gray, some are not exactly black,
so I only choose notepad , since it is using black words
but some
Hello
Here a code for a simple demultiplexer coroutine
def demultiplexer(target1, target2):
while True:
data = yield
target1.send(data)
target2.send(data)
When data is sent to target1, what Cpython do
immediately after ?
1- Go on execute demultiplexer, so send a dat
https://gist.github.com/hoyeunglee/3d340ab4e9a3e2b7ad7307322055b550
I updated again
how to do better because some words are stored in different files
On Thursday, August 3, 2017 at 10:02:01 AM UTC+8, Ho Yeung Lee wrote:
> https://gist.github.com/hoyeunglee/f371f66d55f90dda043f7e7fea38ffa2
>
> I
On 02/08/2017 20:34, Glenn Linderman wrote:
On 8/2/2017 1:13 AM, Robin Becker wrote:
we always seem to get keys in K even if it is an empty list.
Can you treat None and empty list the same?
Looking at the envirnment that the cgi script sees I cannot see anything
obvious except the expecte
21 matches
Mail list logo