On Tue, Jun 23, 2015 at 7:06 PM, Paul Rubin wrote:
> Chris Angelico writes:
>>> Would I have to do an O(n) search to find my key?
>> Iterate over it - it's an iterable view in Py3 - and compare.
>
> I think the question was whether the O(n) search could be avoided, not
> how to do it. I don't se
Dan Stromberg wrote:
> I know that sounds strange: usually we look up values by key, not keys.
>
> But suppose you have a strange key type that despite being "equal", is
> not identical in some fields, and you need to see those fields.
>
> Is there a way of getting the key used by the dictionary
On Wed, 24 Jun 2015 11:32 am, MRAB wrote:
> On 2015-06-24 01:21, Dan Stromberg wrote:
>> I know that sounds strange: usually we look up values by key, not keys.
>>
>> But suppose you have a strange key type that despite being "equal", is
>> not identical in some fields, and you need to see those f
On Wed, 24 Jun 2015 06:16 am, kbtyo wrote:
> I am working on a workflow module that will allow one to recursively check
> for file extensions and if there is a match move them to a folder for
> processing (parsing, data wrangling etc).
>
> I have a simple search process, and log for the files tha
On Wed, 24 Jun 2015 03:15 am, Sahlusar wrote:
> That is not the underlying issue. Any thoughts or suggestions would be
> very helpful.
Thank you for spending over 100 lines to tell us what is NOT the underlying
issue. I will therefore tell you what is NOT the solution to your problem
(whatever i
On Wed, 24 Jun 2015 10:21 am, Dan Stromberg wrote:
> I know that sounds strange: usually we look up values by key, not keys.
>
> But suppose you have a strange key type that despite being "equal", is
> not identical in some fields, and you need to see those fields.
>
> Is there a way of getting
On 2015-06-24 01:21, Dan Stromberg wrote:
I know that sounds strange: usually we look up values by key, not keys.
But suppose you have a strange key type that despite being "equal", is
not identical in some fields, and you need to see those fields.
Is there a way of getting the key used by the
Chris Angelico writes:
>> Would I have to do an O(n) search to find my key?
> Iterate over it - it's an iterable view in Py3 - and compare.
I think the question was whether the O(n) search could be avoided, not
how to do it. I don't see a way to avoid it. There is fundamental
brokenness in havi
Dan Stromberg writes:
> On Tue, Jun 23, 2015 at 5:33 PM, Ben Finney
> wrote:
> > Dan Stromberg writes:
> >
> >> Is there a way of getting the key used by the dictionary, short of
> >> storing a reference to it in the value, or using a second dictionary?
> >
> > The dictionary knows its keys an
Dan Stromberg writes:
> suppose you have a strange key type that despite being "equal", is
> not identical in some fields
Don't do that. You were asking for trouble and you got some.
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Jun 24, 2015 at 10:47 AM, Dan Stromberg wrote:
> Would I have to do an O(n) search to find my key?
Iterate over it - it's an iterable view in Py3 - and compare.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Jun 23, 2015 at 5:33 PM, Ben Finney wrote:
> Dan Stromberg writes:
>
>> Is there a way of getting the key used by the dictionary, short of
>> storing a reference to it in the value, or using a second dictionary?
>
> The dictionary knows its keys and can provide them on request. Call the
>
Dan Stromberg writes:
> Is there a way of getting the key used by the dictionary, short of
> storing a reference to it in the value, or using a second dictionary?
The dictionary knows its keys and can provide them on request. Call the
‘dict.keys’ method to get them as a collection.
--
\ “
I know that sounds strange: usually we look up values by key, not keys.
But suppose you have a strange key type that despite being "equal", is
not identical in some fields, and you need to see those fields.
Is there a way of getting the key used by the dictionary, short of
storing a reference to
On Tuesday, June 23, 2015 at 2:32:55 PM UTC-4, Tim wrote:
> I spent a while finding this problem which looks something like the old
> "mutable default argument" problem.
> http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments
>
> I'm not crystal clear on the details,
On 23/06/2015 21:12, Dennis Lee Bieber wrote:
On Tue, 23 Jun 2015 16:26:28 +0200 (CEST), Jean-Michel Pichavant
declaimed the following:
Just to update, you are correct, Chris, the file short name is passed
into sys.argv. didn't need to add anything to the path. But a gotcha
-- Windows didn't l
I am working on a workflow module that will allow one to recursively check for
file extensions and if there is a match move them to a folder for processing
(parsing, data wrangling etc).
I have a simple search process, and log for the files that are present (see
below). However, I am puzzled b
It was an XML formatting issue; apparently you have to explicitly call a
delimiter via the Command Prompt on my OS. IPython Notebook seems to make
certain assumptions regarding read and write.
On Tue, Jun 23, 2015 at 3:12 PM, John Gordon wrote:
> In Sahlusar <
> ahlusar.ahluwa...@gmail.com> wri
On Tue, Jun 23, 2015 at 12:32 PM, Tim wrote:
> The code below prints the following two lines, showing how the 'newkey' is
> now inside the Client response, even though it was set in the worker. This
> must be bad practice! In my real code, the response is no longer an instance
> variable, whi
In Sahlusar
writes:
> However, when I extrapolate this same logic with a list like:
> ('Response.MemberO.PMembers.PMembers.Member.CurrentEmployer.EmployerAddress
> .TimeAtPreviousAddress.', None), where the headers/columns are the first
> item (only to be written out once) with different value
I spent a while finding this problem which looks something like the old
"mutable default argument" problem.
http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments
I'm not crystal clear on the details, but once I found it, the fix was easy.
I'm posting here just because
I have the following script for writing out to CSV two items in a list to a CSV
in such a format, such that if we have:
L = [('A', 1), ('B', 2), ('C', 3), ('D', 4),('A', 5), ('B', 6), ('D', 8)]
we want
A B C D
1 2 3 4
5 6 8
And with this
L = [('A', 1), ('B', 2), ('C', 3), ('D', 4),('D', 5)
Mark Lawrence wrote:
> Another beasty I've just stumbled across which you may find interesting
> http://www.sciencedirect.com/science/article/pii/S2213133714000687
Why use a JIT complation when you could use some C++ generation then
compilation as Python module, like with Pythran ?
https://git
On 6/22/2015 9:32 PM, Paul Rubin wrote:
Travis Griggs writes:
The following seems to obtuse/clever for its own good:
return sum(1 for _ in self.path.iterdir())
I disagree. For one who understands counting and Python, this is a
direct way to define the count of a finite iterable. A fun
On Wed, Jun 24, 2015 at 12:26 AM, Jean-Michel Pichavant
wrote:
>> Just to update, you are correct, Chris, the file short name is passed
>> into sys.argv. didn't need to add anything to the path. But a gotcha
>> -- Windows didn't like my .py, clicking on the pdf causes Windows to
>> complain about
> Just to update, you are correct, Chris, the file short name is passed
> into sys.argv. didn't need to add anything to the path. But a gotcha
> -- Windows didn't like my .py, clicking on the pdf causes Windows to
> complain about 'file x' is not a valid windows executable.
I'm not an expert of w
On 06/22/2015 07:51 PM, Tim Chase wrote:
> On Win32, you'd need the Win32 add-on libraries to shove things onto
> the clipboard, while under X, you'd need other facilities (either
> using Tkinter or piping to something like xclip(1)), and yet another
> way of doing things on MacOS.
Or you may want
On Thursday, June 18, 2015 at 5:05:15 PM UTC-4, Naftali wrote:
> Long time lurker.
>
> I'm looking to register a python script as the default pdf reader for
> windows. I assume I can just register the .py in the section windows section
> for registering default handlers, but I'm wondering how t
Travis Griggs wrote:
> Subject nearly says it all.
>
> If i’m using pathlib, what’s the simplest/idiomatic way to simply count
> how many files are in a given directory?
>
> I was surprised (at first) when
>
> len(self.path.iterdir())
>
> I don’t say anything on the in the .stat() object t
In a message of Mon, 22 Jun 2015 20:42:21 -, "Devaki Chokshi (dchokshi)" wr
ites:
>Hello,
>
>I have a use case where a SIP voice call will be passing through an MGCP
>gateway.
>
>Is there a python implementation that simulates MGCP gateway/server?
>
>Thank you
>Devaki Chokshi
>
>--
>https://m
On Tuesday, June 23, 2015 at 2:35:50 AM UTC-4, Denis McMahon wrote:
> On Sun, 21 Jun 2015 16:56:27 -0700, Sahlusar wrote:
>
> > Here is an example XML document that I am working with:
>
> > You are welcome to contribute and provide me with feedback. Thank you
> > for your continued feedback and g
I use len(list(self.path.iterdir()))
You get an extra list created in there. Do you care?
Laura
--
https://mail.python.org/mailman/listinfo/python-list
Hi Everyone,
I was curious whether there was a way to get a list of all stores from a store
locator? Currently I am limited to 10 so using requests in python doesn't give
me much advantage over the web-browser interface:
import requests
url =
'http://promotions.coral.co.uk/iframes/shop_locato
On 22/06/2015 21:42, Devaki Chokshi (dchokshi) wrote:
Hello,
I have a use case where a SIP voice call will be passing through an MGCP
gateway.
Is there a python implementation that simulates MGCP gateway/server?
Thank you
Devaki Chokshi
There appears to be, but I'll let you type "python MG
CALL FOR PAPERS
2015 Workshop on Exascale Multi/many Core Computing Systems (E-MuCoCoS)
- Paper submission deadline: June 30, 2015 (firm deadline)
- Workshop proceedings are published by the IEEE
* CONTEXT
Exascale computing will revolutionize computational science and
engineering by providin
Hello,
I have a use case where a SIP voice call will be passing through an MGCP
gateway.
Is there a python implementation that simulates MGCP gateway/server?
Thank you
Devaki Chokshi
--
https://mail.python.org/mailman/listinfo/python-list
Python users,
Abstracts are now being accepted for the
2016 ASA Conference on Statistical Practice,
February 18-20,
San Diego, CA, USA.
Conference attendees are not typically familiar with Python. It would be
great to have someone from the Python community give a brief overview of
37 matches
Mail list logo