On Wednesday, December 4, 2013 11:15:05 AM UTC+5:30, Tim Roberts wrote:
> Piotr Dobrogost wrote:
> >
> >Attribute access syntax being very concise is very often preferred
> >to dict's interface.
>
> It is not "very concise". It is slightly more concise.
>
> x = obj.value1
> x = dct['val
Piotr Dobrogost wrote:
>
>Attribute access syntax being very concise is very often preferred
>to dict's interface.
It is not "very concise". It is slightly more concise.
x = obj.value1
x = dct['value1']
You have saved 3 keystrokes. That is not a significant enough savings to
create
> #--- temp.py -
> #run at Python 2.7 command prompt
> import time
> import multiprocessing as mp
> lst = []
> lstlst = []
>
> def alist(x):
> lst.append(x)
> lstlst.append(lst)
> print "a"
> return lst
>
> if __name__=='__main__':
> pool = mp
On Wed, 04 Dec 2013 09:34:13 +0800, Zhang Weiwu wrote:
> Why would anyone use [logging.config.listen()]? I can't think of use
> cases when one need to change logging configuration dynamically
> through socket, but not needing the same flexibility on overall
> configuration for his application (con
On Wed, Dec 4, 2013 at 12:39 PM, rusi wrote:
> The unfortunate and inexorable conclusion is that when the
> (wo)man <-> computer relation goes from 1-1 to 1-many, data and
> functionality will move away from 'own-machine' to the cloud.
>
> Will the data be subject to privacy-abuse and worse? Sure
在 2013年12月3日星期二UTC+8上午9时42分11秒,rusi写道:
> On Tuesday, December 3, 2013 6:45:42 AM UTC+5:30, iMath wrote:
>
> > so is there any way to create a temporary file by Python here ?
>
>
>
> http://docs.python.org/2/library/tempfile.html
I use the following code to do the test ,but error occurred ,it pr
在 2013年12月3日星期二UTC+8上午9时42分11秒,rusi写道:
> On Tuesday, December 3, 2013 6:45:42 AM UTC+5:30, iMath wrote:
>
> > so is there any way to create a temporary file by Python here ?
>
>
>
> http://docs.python.org/2/library/tempfile.html
I use the following code to do the test ,but error occurred ,it pr
On Wednesday, December 4, 2013 6:10:05 AM UTC+5:30, Cameron Simpson wrote:
> > Dennis Lee Bieber writes:
> > > [NNTP] clients provide full-fledged editors
> >and conversely full-fledged editors provide
> >NNTP clients
> GNU Emacs is a LISP operating system disguised as a word processor.
On Tuesday, November 26, 2013 2:13:57 PM UTC-8, jos...@gmail.com wrote:
> I am currently using Windows 7 Sp1, Tkinter 8.5, Python 2.7.4 on a laptop
> with no attached monitor. I am attempting to use winfo_screenmmwidth, but the
> returned value is incorrect. Specs state 280 mm. Physical measureme
Why would anyone use it? I can't think of use cases when one need to change
logging configuration dynamically through socket, but not needing the same
flexibility on overall configuration for his application (configparser). It
feels strange to design a socket interface only to expose logging
co
On 2013-12-03 15:47, Piotr Dobrogost wrote:
> > The getattr function is meant for when your attribute name is in a
> > variable. Being able to use strings that aren't valid identifiers
> > is a side effect.
>
> Why do you say it's a side effect?
I think random832 is saying that the designed pu
在 2013年12月4日星期三UTC+8上午7时23分49秒,Cameron Simpson写道:
> On 03Dec2013 16:34, Ned Batchelder wrote:
>
> > On 12/3/13 4:19 PM, Cameron Simpson wrote:
>
> > >And then I check the source:-( He actually said "I want to a fixed
>
> > >length list-like container". That still sounds like a limit to the
>
>
On 30Nov2013 14:25, pec...@pascolo.net wrote:
> Dennis Lee Bieber writes:
> > [NNTP] clients provide full-fledged editors
>and conversely full-fledged editors provide
>NNTP clients
GNU Emacs is a LISP operating system disguised as a word processor.
- Doug Mohney, in comp.arch
On 28Nov2013 19:46, Arif Khokar wrote:
> The problem with just using email is that it's a bit more difficult
> to browse archived posts to this group. After I subscribed to this
> group (comp.lang.python) using my news client, I could immediately
> browse posts made as far back as April.
I vastl
On 3/12/2013 5:13 PM, Steven D'Aprano wrote:
You poor fools you, this is what happens when you give control of the
tools you use to a (near) monopolist whose incentives are not your
incentives.
To paraphrase Franklin: those who would give up control to purchase
convenience deserve neither. A l
On Wed, Dec 4, 2013 at 11:15 AM, Hans-Peter Jansen wrote:
> Given the amount of special unicode handling code, that is necessary to keep
> Python 2 happy, makes proceeding with it no real fun on a longer term..
>
> And the biggest proponent for hacking in Python IS the fun part of it. Then
> produ
Hi Chris,
On Mittwoch, 4. Dezember 2013 10:20:31 Chris Angelico wrote:
> On Wed, Dec 4, 2013 at 9:32 AM, Hans-Peter Jansen wrote:
> > I'm experiencing strange behavior with attached code, that differs
> > depending on sys.setdefaultencoding being set or not. If it is set, the
> > code works as ex
On Tue, 03 Dec 2013 07:48:43 -0800, geezle86 wrote:
> I am trying to solve this problem:
>
> http://codeforces.com/problemset/problem/71/A
That's not a problem, it's a url.
> The input and output is as wanted, but my answer keep rejected, here is
> my source code http://txt.do/1smv
That's not
On Tuesday, December 3, 2013 6:31:58 PM UTC+1, Ethan Furman wrote:
>
> When would you have attribute names that are not valid identifiers?
>
See my answer to rand's post.
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, December 3, 2013 7:03:41 PM UTC+1, rand...@fastmail.us wrote:
> On Tue, Dec 3, 2013, at 12:14, Piotr Dobrogost wrote:
>
> > Hi!
>
> > I find global getattr() function awkward when reading code.
> > What is the reason there's no "natural" syntax allowing to access
> > attributes with n
On 03Dec2013 14:43, Ian Kelly wrote:
> On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson wrote:
> > On 03Dec2013 12:18, Helmut Jarausch wrote:
> >> I'd like to extracted elements from a heapq in a for loop.
> >> I feel my solution below is much too complicated.
> >> How to do it more elegantly?
>
On 03Dec2013 16:34, Ned Batchelder wrote:
> On 12/3/13 4:19 PM, Cameron Simpson wrote:
> >And then I check the source:-( He actually said "I want to a fixed
> >length list-like container". That still sounds like a limit to the
> >number of entries.
>
> Sorry, I was unclear. When I said, "I don't
On Wed, Dec 4, 2013 at 9:32 AM, Hans-Peter Jansen wrote:
> I'm experiencing strange behavior with attached code, that differs depending
> on sys.setdefaultencoding being set or not. If it is set, the code works as
> expected, if not - what should be the usual case - the code fails with some
> non-
On 12/3/13 4:43 PM, Ian Kelly wrote:
On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson wrote:
On 03Dec2013 12:18, Helmut Jarausch wrote:
I'd like to extracted elements from a heapq in a for loop.
I feel my solution below is much too complicated.
How to do it more elegantly?
I can't believe no
Hi,
I'm experiencing strange behavior with attached code, that differs depending
on sys.setdefaultencoding being set or not. If it is set, the code works as
expected, if not - what should be the usual case - the code fails with some
non-sensible traceback.
I tried to boil it down to a comprehe
On Tue, Dec 3, 2013 at 2:13 PM, Cameron Simpson wrote:
> On 03Dec2013 12:18, Helmut Jarausch wrote:
>> I'd like to extracted elements from a heapq in a for loop.
>> I feel my solution below is much too complicated.
>> How to do it more elegantly?
>
> I can't believe nobody has mentioned PriorityQ
On 12/3/13 4:19 PM, Cameron Simpson wrote:
On 04Dec2013 08:17, I wrote:
On 02Dec2013 07:26, Ned Batchelder wrote:
Actually, I had a long conversation in the #python IRC channel with
the OP at the same time he was posting the question here, and it
turns out he knows exactly how many entries are
On 04Dec2013 08:17, I wrote:
> On 02Dec2013 07:26, Ned Batchelder wrote:
> > Actually, I had a long conversation in the #python IRC channel with
> > the OP at the same time he was posting the question here, and it
> > turns out he knows exactly how many entries are going into the
> > "queue", so a
On 02Dec2013 07:26, Ned Batchelder wrote:
> Actually, I had a long conversation in the #python IRC channel with
> the OP at the same time he was posting the question here, and it
> turns out he knows exactly how many entries are going into the
> "queue", so a plain-old list is the best solution.
On 03Dec2013 12:18, Helmut Jarausch wrote:
> I'd like to extracted elements from a heapq in a for loop.
> I feel my solution below is much too complicated.
> How to do it more elegantly?
I can't believe nobody has mentioned PriorityQueue.
A PriorityQueue (from the queue module in python 3 and t
Le mardi 3 décembre 2013 06:06:26 UTC+1, Steven D'Aprano a écrit :
> On Mon, 02 Dec 2013 16:14:13 -0500, Ned Batchelder wrote:
>
>
>
> > On 12/2/13 3:38 PM, Ethan Furman wrote:
>
> >> On 11/29/2013 04:44 PM, Steven D'Aprano wrote:
>
> >>>
>
> >>> Out of the nine tests, Python 3.3 passes six,
On Tue, Dec 3, 2013, at 12:14, Piotr Dobrogost wrote:
> Hi!
>
> I find global getattr() function awkward when reading code.
> What is the reason there's no "natural" syntax allowing to access
> attributes with names not being valid Python identifiers in a similar way
> to other attributes?
> Somet
On Tue, 3 Dec 2013 08:35:20 -0800 (PST), geezl...@gmail.com wrote:
really, i dont know why.. :(
How about because you do a system exit on the first line of their
input? The one that's all digits. And even if you get past that, you
only process one of their words.
--
DaveA
--
https://mail.p
On 12/03/2013 09:14 AM, Piotr Dobrogost wrote:
I find global getattr() function awkward when reading code.
What is the reason there's no "natural" syntax allowing to
access attributes with names not being valid Python
identifiers in a similar way to other attributes?
Something along the line
On Tue, 3 Dec 2013 09:14:49 -0800 (PST), Piotr Dobrogost
wrote:
I find global getattr() function awkward when reading code.
Me too.
What is the reason there's no "natural" syntax allowing to access
attributes with names not being valid Python identifiers in a similar
way to other attributes
On 12/3/13 12:14 PM, Piotr Dobrogost wrote:
Hi!
I find global getattr() function awkward when reading code.
What is the reason there's no "natural" syntax allowing to access attributes
with names not being valid Python identifiers in a similar way to other attributes?
Something along the line o
On Tuesday, December 3, 2013 9:18:43 PM UTC+5:30, geez...@gmail.com wrote:
> I am trying to solve this problem:
>
> http://codeforces.com/problemset/problem/71/A
>
> The input and output is as wanted, but my answer keep rejected, here is my
> source code http://txt.do/1smv
>
> Please, I need help.
Hi!
I find global getattr() function awkward when reading code.
What is the reason there's no "natural" syntax allowing to access attributes
with names not being valid Python identifiers in a similar way to other
attributes?
Something along the line of
my_object.'valid-attribute-name-but-not-va
On 2013-12-03, geezl...@gmail.com wrote:
>> x = input()
Your first problem is that input() returns text only up the a
newline, and then stops.
So you are reading the initial number line, but never reading the
rest of the lines.
--
Neil Cerutti
--
https://mail.python.org/mailman/listinfo/pyt
On 12/03/2013 09:04 AM, Travis Griggs wrote:
> Having forayed into the world of small small micro controllers myself
> this last year and a half, I’m kind of torn on whether this is a good
> idea or not. But I think it’s cool they’re trying. And I’d definitely
> try it to see how it worked out.
I'
On 03/12/2013 16:38, geezl...@gmail.com wrote:
Well,
i've changed the "if len(xList).." from 4 to 10
But still, it is not accepted :(
Where is your code that meets these requirements?
Input
The first line contains an integer n (1?=?n?=?100). Each of the
following n lines contains one word. A
Well,
i've changed the "if len(xList).." from 4 to 10
But still, it is not accepted :(
--
https://mail.python.org/mailman/listinfo/python-list
> x = input()
>
> if x.isdigit() == False:
> i = len(x)
> j = i - 1
> k = i - 2
>
> xList = list(x)
>
> if len(xList) > 4:
> print(xList[0], int(k), xList[j], sep='', end='')
> else:
> print(x)
> else:
> SystemExit
I just dont understand w
> x = input()
>
> if x.isdigit() == False:
> i = len(x)
> j = i - 1
> k = i - 2
>
> xList = list(x)
>
> if len(xList) > 4:
> print(xList[0], int(k), xList[j], sep='', end='')
> else:
> print(x)
> else:
> SystemExit
I just dont understand wh
On 12/03/2013 07:18 AM, Colin J. Williams wrote:
> On 03/12/2013 7:58 AM, Mark Lawrence wrote:
>> I thought this might be of interest
>> Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers
>>
>>
> Is this intended to be better than the Raspberry PI? RPi handles P
On 2013-12-03, geezl...@gmail.com wrote:
> I am trying to solve this problem:
>
> http://codeforces.com/problemset/problem/71/A
Please post your code in and the problem in your message. Here it
is for those reading along:
> A. Way Too Long Words
> Sometimes some words like "localization" or
> "i
In <387f5b5f-faf1-4715-8d49-e366be53f...@googlegroups.com> geezl...@gmail.com
writes:
> I am trying to solve this problem:
> http://codeforces.com/problemset/problem/71/A
> The input and output is as wanted, but my answer keep rejected, here is
> my source code http://txt.do/1smv
> Please, I n
On Dec 3, 2013, at 6:18 AM, Colin J. Williams wrote:
> On 03/12/2013 7:58 AM, Mark Lawrence wrote:
>> I thought this might be of interest
>> Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers
>>
>>
> Is this intended to be better than the Raspberry PI? RPi
I am trying to solve this problem:
http://codeforces.com/problemset/problem/71/A
The input and output is as wanted, but my answer keep rejected, here is my
source code http://txt.do/1smv
Please, I need help.
--
https://mail.python.org/mailman/listinfo/python-list
Le 03/12/13 16:27, Stéphane Klein a écrit :
> python-dateutil have a auto discover parse function, but I don't want to use
> this auto discover feature
For now, I use this :
import dateutil.parser
import pytz
tz_str = '''-12 Y
-11 X NUT SST
-10 W CKT HAST HST TAHT TKT
-9 V AKST GAMT GIT
Le 03/12/13 11:07, Stuart Bishop a écrit :
> It could go into pytz (but generated from the IANA database, not from
> the list you quote). Whether it should go into pytz is debatable.
>
Ok.
> If you need to map an abbreviation back to a single timezone you are
> solving the wrong problem, because
On 12/02/2013 12:38 PM, Ethan Furman wrote:
On 11/29/2013 04:44 PM, Steven D'Aprano wrote:
Out of the nine tests, Python 3.3 passes six, with three tests being
failures or dubious. If you believe that the native string type should
operate on code-points, then you'll think that Python does the r
Saw this on a UK Python mailing list and couldn't resist
http://thesandtrap.com/products/snake-eyes-python-xld-iron-head
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-
On 03/12/2013 7:58 AM, Mark Lawrence wrote:
I thought this might be of interest
Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers
Is this intended to be better than the Raspberry PI? RPi handles Python
2 or 3.
How would it differ?
Colin W.
--
https://ma
在 2013年12月3日星期二UTC+8下午5时33分09秒,Alain Ketterlin写道:
> Ben Finney writes:
>
>
>
> > Chris Angelico writes:
>
> >
>
> >> On Mon, Dec 2, 2013 at 10:34 PM, iMath wrote:
>
> >> > ffmpeg -f concat -i <(for f in ./*.wav; do echo "file '$f'"; done) -c
> >> > copy output.wav
>
> >> > ffmpeg -f conc
Helmut Jarausch writes:
...
> I know I could use a while loop but I don't like it.
...
> from heapq import heappush, heappop
> # heappop raises IndexError if heap is empty
...
> # how to avoid / simplify the following function
>
> def in_sequence(H) :
> try :
> while True :
> N= heappo
On 2013-12-02, Ethan Furman wrote:
> On 11/29/2013 04:44 PM, Steven D'Aprano wrote:
>> Out of the nine tests, Python 3.3 passes six, with three tests
>> being failures or dubious. If you believe that the native
>> string type should operate on code-points, then you'll think
>> that Python does the
Helmut Jarausch wrote:
> Hi,
>
> I'd like to extracted elements from a heapq in a for loop.
> I feel my solution below is much too complicated.
> How to do it more elegantly?
> I know I could use a while loop but I don't like it.
>
> Many thanks for some lessons in Python.
>
> Here is my clum
I thought this might be of interest
Http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/pytho
On Tuesday, December 3, 2013 5:48:59 PM UTC+5:30, Helmut Jarausch wrote:
> Hi,
>
> I'd like to extracted elements from a heapq in a for loop.
> I feel my solution below is much too complicated.
> How to do it more elegantly?
> I know I could use a while loop but I don't like it.
How about
def in
Helmut Jarausch wrote:
> Hi,
>
> I'd like to extracted elements from a heapq in a for loop.
> I feel my solution below is much too complicated.
> How to do it more elegantly?
> I know I could use a while loop but I don't like it.
>
> Many thanks for some lessons in Python.
>
> Here is my clumsy
On 03/12/2013 01:38, Roy Smith wrote:
In article ,
Mark Lawrence wrote:
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
"I believe that Pythonistas should commit themselves to achieving the
goal, before this decade is out, of making Py
Hi,
I'd like to extracted elements from a heapq in a for loop.
I feel my solution below is much too complicated.
How to do it more elegantly?
I know I could use a while loop but I don't like it.
Many thanks for some lessons in Python.
Here is my clumsy solution
from heapq import heappush, heap
On 03/12/2013 04:32, Grant Edwards wrote:
On 2013-12-03, Roy Smith wrote:
"I believe that Pythonistas should commit themselves to achieving the
goal, before this decade is out, of making Python 3 the default version
and having everybody be cool with unicode."
I'm cool with Unicode as long as
On 03/12/2013 01:17, Michael Torrie wrote:
And the list goes on.
The love of money...
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, Dec 2, 2013 at 11:18 PM, Stéphane Klein
wrote:
> * are there the same list somewhere (I didn't found in pytz) ?
Not that I know of.
> * is it possible to append this list in pytz or in standard python date
> module ?
It could go into pytz (but generated from the IANA database, not fro
Ben Finney writes:
> Chris Angelico writes:
>
>> On Mon, Dec 2, 2013 at 10:34 PM, iMath wrote:
>> > ffmpeg -f concat -i <(for f in ./*.wav; do echo "file '$f'"; done) -c copy
>> > output.wav
>> > ffmpeg -f concat -i <(printf "file '%s'\n" ./*.wav) -c copy output.wav
>> > ffmpeg -f concat -i <(
67 matches
Mail list logo