eout occurs."
The benefit is that setting the flag terminates the loop straight away, as
opposed to waiting for the sleep to finish.
I can show some sample code if anyone is interested.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> a1 = 0xf4
>>> a1
244
>>> b1 = '0x{:x}'.format(a1)
>>> b1
&
ndard way of parsing it? If
not, I will have to special-case it, but I would prefer to avoid that if
possible.
Thanks
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
ething seems to have gone wrong with the system font. I don't use IDLE,
but I use OutlookExpress and Textpad, and they both show a similar effect.
I can live with it for now. I am hoping (with fingers crossed) that enough
people will complain to Microsoft that they will issue a fix shortly.
F
eturn a date object -
>>> cur.execute('SELECT CAST(? AS DATE)', ('2015-03-31',))
>>> cur.fetchone()
(2015,)
>>>
I don't know how easy this would be to implement, but it would be nice if it
could be made to work.
Is it worth filing a feature request?
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Chris Angelico" wrote in message
news:CAPTjJmrB+55CVgN6zTUawRf=rzn9ltavi5tzhjsyvhhywk1...@mail.gmail.com...
> On Wed, Feb 18, 2015 at 5:19 PM, Frank Millman wrote:
>> However, the following does not return a date object -
>>
>>>>> cur.execut
"Mark Lawrence" wrote in message
news:mc1g3n$q8j$1...@ger.gmane.org...
> On 18/02/2015 06:19, Frank Millman wrote:
>> Hi all
>>
>> sqlite3 does not have a DATE type, but the python module does a pretty
>> good
>> job of providing one -
>>
>&g
are no longer alive, they are
automatically removed from the WeakSet, preventing me from accidentally
calling them when they are dead."
I found that the reference was not removed immediately, but was waiting to
be garbage collected. During that window, I could call the callback, which
resul
"Steven D'Aprano" wrote in message
news:54e8af1b$0$12976$c3e8da3$54964...@news.astraweb.com...
> Frank Millman wrote:
>
>> I tried something similar a while ago, and I did find a gotcha.
>>
>> The problem lies in this phrase - "if they are no longer a
"Cem Karan" wrote in message
news:a3c11a70-5846-4915-bb26-b23793b65...@gmail.com...
>
>
> Good questions! That was why I was asking about 'gotchas' with WeakSets
> originally. Honestly, the only way to know for sure would be to write two
> APIs for doing similar things, and then see how peop
thon3 to return a float -
>>> 10/3
3.3335
You can reproduce the python3 behaviour in python2 by adding a 'future'
directive -
>>> from __future__ import division
>>> 10/3
3.3335
HTH
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Luke Geelen" wrote in message
news:ae0da085-6c41-4166-92d2-92611a990...@googlegroups.com...
> Op zaterdag 15 februari 2014 11:04:17 UTC+1 schreef Frank Millman:
>> "Luke Geelen" wrote in message
>>
>> news:ec88852e-1384-4aa5-834b-85135be94...@g
"Frank Millman" wrote in message
news:ldngnf$c3r$1...@ger.gmane.org...
>
> "Luke Geelen" wrote in message
> news:ae0da085-6c41-4166-92d2-92611a990...@googlegroups.com...
>> Op zaterdag 15 februari 2014 11:04:17 UTC+1 schreef Frank Millman:
oop
C:\>python -m timeit -s "import copy" "copy.deepcopy(b'a'*1000)"
10 loops, best of 3: 11.7 usec per loop
As you can see, deepcopying a string is slightly slower than copying it.
However, deepcopying a byte string is orders of magnitude quicker than
copying
box.sort() sorts box 'in situ', but does not return anything. That is why
the second example prints None.
In your second example, you are comparing the return value of box.sort()
with [1, 2, 3]. As the return value is None, they are unequal.
HTH
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Frank Millman" wrote in message
news:lemm11$18r$1...@ger.gmane.org...
> Hi all
>
> I noticed this a little while ago, but dismissed it as a curiosity. On
> reflection, I decided to mention it here in case it indicates a problem.
>
> This is with python 3.3.2.
and python 3.3.2.
I have just booted it up now, called up a command prompt, typed 'python' to
start the interpreter, and typed 'import decimal'. The interpreter prompt
re-appeared in the blink of an eye.
Are you talking about something else?
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Chris Angelico" wrote in message
news:CAPTjJmrmJjiGMfqui=PpJco7LjtqVpUjj=xnmtybyqemxg3...@mail.gmail.com...
> On Sun, Mar 2, 2014 at 4:51 PM, Frank Millman wrote:
>> Which version are you talking about?
>>
>> I have an old, slow box running Windows Server 2003
ny machine?
Any hints will be appreciated.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Chris Angelico" wrote in message
news:CAPTjJmqPca5cnNWu8T5BZhpH665X0=mrf7bjalqvrqvmjzw...@mail.gmail.com...
> On Tue, Mar 18, 2014 at 12:06 AM, Frank Millman
> wrote:
[...]
>>
>> So where should I install the SCM, and how should I set it up so that I
>> can
"Chris Angelico" wrote in message
news:captjjmqhxh2m3-qgbelv_akgajzmeymbudly8_dkpnhrpsu...@mail.gmail.com...
> On Tue, Mar 18, 2014 at 4:39 PM, Frank Millman wrote:
>> Two quick questions -
>>
>> 1. At present the source code is kept on one machine (A), but on
"Andriy Kornatskyy" wrote in message
news:blu0-smtp953c8572b5ca6374830e5091...@phx.gbl...
> Frank,
>
> I would suggest start with an account on https://bitbucket.org. It
> supports private repositories so you should be good there.
>
> From other hand you can setup own infrastructure for SCM, re
"Ben Finney" wrote in message
news:85y508roiw@benfinney.id.au...
> "Frank Millman" writes:
>
>> I feel that I have just not grasped the basics yet, so any assistance
>> that
>> puts me on the right path is appreciated.
>
> Here is &qu
"Frank Millman" wrote in message
news:lg6s09$irl$1...@ger.gmane.org...
> Hi all
>
> I know I *should* be using a Source Control Management system, but at
> present I am not. I tried to set up Mercurial a couple of years ago, but I
> think I set it up wrongly, as
"Frank Millman" wrote in message
news:lgbe6g$j9o$1...@ger.gmane.org...
>
>
> To recap my basic setup, I have machine A which holds the source
> directory, machine B which is used to edit the program, and machines B and
> C which are both used to run the program.
>
"Cameron Simpson" wrote in message
news:20140321013313.ga58...@cskk.homeip.net...
>
> Someone intending to clone the project and develop will probably
> want the whole repository; as Gregory says - they can then easily
> push/pull with others.
>
> For Frank, the size of the repo is not the size
"Rustom Mody" wrote in message
news:19d3ddc9-0fb9-476d-a117-e5f174eca...@googlegroups.com...
> On Monday, March 17, 2014 6:36:33 PM UTC+5:30, Frank Millman wrote:
>> Hi all
>
>> I know I *should* be using a Source Control Management system, but at
>> p
would mention it here in case others are equally unaware.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
fault('a', get_value('xyz'))
getting value xyz
'xyzxyz'
>>> my_dict.setdefault('a', get_value('abc'))
getting value abc
'xyzxyz'
>>> my_dict
{'a': 'xyzxyz'}
>>>
It seems odd. Is there a situation where this behaviour is useful?
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Chris Angelico" wrote in message
news:captjjmpk-rqx0fp6_4vxyus2z34vc5fq_qntj+q9+kn8y5u...@mail.gmail.com...
> On Tue, Apr 8, 2014 at 5:14 PM, Frank Millman wrote:
>> It appears that when you use 'setdefault', the default is always
>> evaluated,
>> e
"Ian Kelly" wrote in message
news:CALwzidmP5Bevbace9GyQrVXe-_2T=jtpq1yvapsaepvomqe...@mail.gmail.com...
> On Tue, Apr 8, 2014 at 1:14 AM, Frank Millman wrote:
>>
>> It appears that when you use 'setdefault', the default is always
>> evaluated,
>>
"Chris Angelico" wrote in message
news:CAPTjJmoRxEhX02ZviHiLO+qi+dD+81smbGGYcPECpHb5E=p4=a...@mail.gmail.com...
> On Tue, Apr 8, 2014 at 6:26 PM, Frank Millman wrote:
>>> words_by_length = {}
>>> for word in open("/usr/share/dict/words"):
>>>
"Chris Angelico" wrote in message
news:captjjmppaqmb6no7udddadqg_jv9yz0sn4d70kasksbwwr3...@mail.gmail.com...
> On Tue, Apr 8, 2014 at 7:28 PM, Frank Millman wrote:
>> Are you saying that
>>
>> all([len(word) == 23 for word in words_by_length[23]]) # hope I g
that a response is returned quickly (however one defines quickly) but
I cannot guarantee it if the database server is under stress. Is this a good
candidate for async, or not?
Thanks for any insights.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Chris Angelico" wrote in message
news:captjjmqwhb8o8vq84mmtv+-rkc3ff1aqdxe5cs8y5gy02kh...@mail.gmail.com...
> On Wed, Apr 9, 2014 at 11:23 PM, Frank Millman wrote:
>
>> How does one distinguish betwen 'blocking' and 'non-blocking'? Is it
>> e
"Marko Rauhamaa" wrote in message
news:87lhveobeq@elektro.pacujo.net...
> "Frank Millman" :
>
>> I understand that, if one uses threading, each thread *can* block
>> without affecting other threads, whereas if one uses the async
>> approach, a re
"Chris Angelico" wrote in message
news:CAPTjJmq2xx_WG2ymCC0NNqisDO=dnnjhnegpid3de+xeiy5...@mail.gmail.com...
> On Thu, Apr 10, 2014 at 12:30 AM, Frank Millman
> wrote:
>>
>>>
>>>> How does one distinguish betwen 'blocking' and 'no
"Chris Angelico" wrote in message
news:CAPTjJmoWaHPZk=DAxbfJ=9ez2aj=4yf2c8wmbryof5vgn6e...@mail.gmail.com...
> On Thu, Apr 10, 2014 at 7:17 PM, Frank Millman wrote:
>> The current version of my program uses HTTP. As I understand it, a client
>> makes a connection a
w the shell interprets
the '#!' line.
My editor allows me to re-save a file using a different format, so I saved
it as 'unix', reran it, and it worked.
HTH
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
gt; give the illusion they are properly working.
>
It is quite frustrating when you make these statements without explaining
what you mean by 'not working'.
It would be really useful if you could spell out -
1. what you did
2. what you expected to happen
3. what actual
rk, but when I ran 'ipython notebook' it failed on 'import
pyzmq'.
I ran 'pip install pyzmq', tried again, and it failed on 'import jinja2'.
I used pip to install that, then it failed on 'import tornado'.
I used pip to install that, and now it
wrote in message
news:281f5806-8793-4fd2-877c-214927dda...@googlegroups.com...
>
> pip looked and saw that you already had it, so did nothing -- what did it
> report? In this caes:
>
> 'pip install -U ipython[notebook]'
>
> might have worked: -U means upgrade even if I already have it.
>
Indee
x27;, and for every potentially blocking
request, grab a connection, set up a callback or a 'yield from' to wait for
the response, and unblock.
Provided the requests return quickly, I would have thought a hundred
database connections could support thousands of users.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Neil Cerutti" wrote in message
news:b5sk3cfkiq...@mid.individual.net...
> On 2013-07-31, Frank Millman wrote:
>>
>>
>> Can anyone explain *why* the results do not compare equal? If I
>> understood the problem, I might be able to find a workaround.
&
"Terry Reedy" wrote in message
news:ktbj9i$4au$1...@ger.gmane.org...
> On 7/31/2013 9:07 AM, Antoine Pitrou wrote:
>>
>> I would suggest asking the psycopg2 project why they made this choice,
>> and
>> if they would reconsider. Returning a memoryview doesn't make much sense
>> IMHO.
>
> I agre
s to the same
type, the triple form does not.
'1' == 1 returns true
'1' === 1 returns false
The moment I discovered this, I changed all my operators from the double
form to the triple form. Now I no longer have surprises of this nature.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"MRAB" wrote in message
news:52568b30.8040...@mrabarnett.plus.com...
> On 10/10/2013 09:23, Frank Millman wrote:
>>
>> "Steven D'Aprano" wrote in message
>> news:52562ee3$0$2931$c3e8da3$76491...@news.astraweb.com...
>>> Just came across t
Python.
Here is a link to the full article -
http://www.economist.com/news/business/21644150-battle-software-talent-other-industries-can-learn-silicon-valley-how-bag
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
me timing tests, and the overhead does indeed
seem to be minimal - 0.0001 sec on a slow desktop machine.
I think it is still worth posting, for any insights into either question.
Thanks
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Chris Angelico" wrote in message
news:CAPTjJmrXp4MSO9f=xb_brupnrz7xrksktkbfvo-e5n7lr_m...@mail.gmail.com...
> On Sun, Mar 8, 2015 at 6:30 PM, Frank Millman wrote:
>> Actually, as I write this, I realise that there is a more important
>> question
>> that had not
ve a look through the archives.
Both groups organise monthly meetings - a good opportunity to mix with other
Python developers.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
t the Library Reference should be updated to include dict
comprehensions.
Just checking here first before I raise a Documentation issue.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Ian Kelly" wrote in message
news:CALwzidnTUifj_L=DSH_8s+z0L44pxVvdpG1+pfz1Tzm=ect...@mail.gmail.com...
> On Sun, Mar 15, 2015 at 11:25 PM, Frank Millman
> wrote:
>> Hi all
>>
>> I like dict comprehensions, but I don't use them very often, so when I
"Paul Rubin" wrote in message
news:87fv95fom0@jester.gateway.sonic.net...
> "Frank Millman" writes:
>> I like dict comprehensions, but I don't use them very often, so when I do
>> I
>> need to look up the format.
>
> I never felt a need
"Terry Reedy" wrote in message
news:me644f$bqj$1...@ger.gmane.org...
>
> Given that list comprehensions are mentioned in the library reference, I
> agree that set and dict comprehensions should be also. Open an issue on
> the tracker pointing to the list entry.
>
>
http://bugs.python.org/iss
"Paul Rubin" wrote in message
news:87wq2hfibu@jester.gateway.sonic.net...
> "Frank Millman" writes:
>> dict((a, b) for a, b in zip(x, y))
>> 10 loops, best of 3: 16.1 usec per loop
>> {a: b for a, b in zip(x, y)}"
>> 10 loo
"Ian Kelly" wrote in message
news:CALwzid=u19ymkfjbhblzi1qh2u9uk4ohy5wco1zo-i3t5at...@mail.gmail.com...
> On Mon, Mar 16, 2015 at 3:01 AM, Frank Millman wrote:
>> C:\>python -m timeit -s "x = range(65, 91); y = (chr(z) for z in x)"
>> "dict(zip(x, y))
"Ian Kelly" wrote in message
news:CALwzidmNDcSvER7S6inEaVZA=DHUrDX1KzL-WRVwhd=o3_l...@mail.gmail.com...
> On Tue, Mar 17, 2015 at 12:44 AM, Frank Millman
> wrote:
>> Thanks for the explanation. I'll try not to make that mistake again.
>>
>> However, to g
less than a second. It
could not solve Marko's second one, returning "impossible" immediately.
Here is another one that does not use python, but uses SQL -
https://www.sqlite.org/lang_with.html
You will find it at the bottom of the page, under the heading "Outlandish
Recu
"Marko Rauhamaa" wrote in message
news:87fv8sndw1@elektro.pacujo.net...
> "Frank Millman" :
>
>> Here is another python-based sudoku solver -
>>
>> http://www.ics.uci.edu/~eppstein/PADS/Sudoku.py
>>
>>>From its docstring -
>&g
"Dave Angel" wrote in message
news:551557b3.5090...@davea.name...
>
> But now I have to disagree about "true Sudoku puzzle." As we said
> earlier, it might make sense to say that puzzles that cannot be solved
> that way are not reasonable ones to put in a human Sudoku book. But why
> isn't
ot; it looks wrong because I have been conditioned to think of it as a
gotcha.
Would it be more pythonic to change them all to use the alternative
"z=None", or is it ok to leave it as it is? Or to phrase it differently, how
would an experienced pythonista react on seeing this when rev
"Steven D'Aprano" wrote in message
news:554c8b0a$0$12992$c3e8da3$54964...@news.astraweb.com...
> On Fri, 8 May 2015 06:01 pm, Frank Millman wrote:
>
>> Hi all
>>
[...]
>>
>> However, every time I look at my own code, and I see "def x(y, z=[
"Ben Finney" wrote in message
news:85y4kzb90f@benfinney.id.au...
> "Frank Millman" writes:
>
>> If I use a list as an argument, I only use it to pass values *into*
>> the function, but I never modify the list.
>
> You've had good reas
"Dave Angel" wrote in message
news:554ca652.1000...@davea.name...
> On 05/08/2015 06:53 AM, Frank Millman wrote:
>>
>
> It might be appropriate to define the list at top-level, as
>
> EMPTY_LIST=[]
>
> and in your default argument as
> def x(y,
"Steven D'Aprano" wrote in message
news:554cd119$0$12977$c3e8da3$54964...@news.astraweb.com...
> On Fri, 8 May 2015 08:53 pm, Frank Millman wrote:
>
>>> Does z have to be a list? Could you use an empty tuple instead?
>>>
>>> def x(y, z=()):
"Frank Millman" wrote in message
news:mik7j6$59n$1...@ger.gmane.org...
>
> "Steven D'Aprano" wrote in message
> news:554cd119$0$12977$c3e8da3$54964...@news.astraweb.com...
>> On Fri, 8 May 2015 08:53 pm, Frank Millman wrote:
>>
>>>&
"Gregory Ewing" wrote in message
news:cr5sc6fgfm...@mid.individual.net...
> Frank Millman wrote:
>
> The absolutely clearest way to write it would
> probably be
>
>def f(things = None):
> "things is a mapping of stuff to be operated on"
>
"Johannes Bauer" wrote in message
news:min3f0$2gh$1...@news.albasani.net...
On 08.05.2015 14:04, Dave Angel wrote:
> > It might be appropriate to define the list at top-level, as
> >
> > EMPTY_LIST=[]
> >
> > and in your default argument as
> > def x(y, z=EMPTY_LIST):
> >
> > and with the a
"Johannes Bauer" wrote in message
news:min9t3$e56$1...@news.albasani.net...
On 10.05.2015 10:58, Frank Millman wrote:
> > It is then a simple extra step to say -
> >
> > EMPTY_L:IST = ()
> >
> > and if required -
> >
> > EMPTY_DICT = ()
>
tes and more."
There seems to be at least some overlap with your requirements, so it may be
worth a look.
It uses wxPython. According to their download page it only works with Python
2.x, but as wxPython for Python3 is getting closer, hopefully it is on their
roadmap to target P
self.arg = arg or []
Based on your comment, I have changed it to -
def __init__(self, arg=None):
self.arg = [] if arg is None else arg
Does this pass your 'stop and consider' test?
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
o
mimic all of this.
I will persevere, but in the meantime, does anyone happen to know under what
other circumstances sqlite3 might issue an implicit commit?
Thanks
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Chris Angelico" wrote in message
news:CAPTjJmrHmj2bsdSm4CQ=orgxutmyctk3w3e3n-qxolg2tvq...@mail.gmail.com...
On Tue, Aug 11, 2015 at 9:33 PM, Frank Millman wrote:
> I have added 'set_trace_callback' to see exactly what is going on, and
> in
> the middle of my
"Frank Millman" wrote in message news:mqcmie$po9$1...@ger.gmane.org...
Hi all
I have a 'data integrity' problem with sqlite3 that I have been battling
with for a while. I have not got to the bottom of it yet but I do have
some useful info, so I thought I would post it h
"Frank Millman" wrote in message news:mqcslv$tee$1...@ger.gmane.org...
"Frank Millman" wrote in message news:mqcmie$po9$1...@ger.gmane.org...
> Hi all
>
> I have a 'data integrity' problem with sqlite3 that I have been battling
> with for a while.
the gui that you choose. Most gui toolkits will have a 'tree'
widget, and hopefully make it easy to implement 'drag-and-drop' between the
nodes. Then your task becomes one of getting the data out of the database
and into the gui, and back again. Once you get used to the concepts
"Alex Glaros" wrote in message
news:ae4e203d-c664-4388-af0b-41c41d5ec...@googlegroups.com...
Frank, thanks for describing the terminology of what I'm trying to do.
1. Do the recursive join Postgres examples you linked to, use a data
structure where the child has the adjoining parent-ID? Exam
and then just use 'import package_name' inside each module?
Another question - I thought that, because aa.py and bb.py are in different
sub-directories, I would have to set them up as packages by adding
'__init__.py' to each one, but it works fine without that. What am I
m
"Ian Kelly" wrote in message
news:calwzidm3khnagtt0ohveo5bhqk1tfejbuuuinw9tnuxrpnr...@mail.gmail.com...
On Thu, Sep 10, 2015 at 1:12 AM, Frank Millman wrote:
> That makes me wonder if, in my project, I can import all modules inside
> 'start.py', and then just use
t;SELECT spreekwoord "
"FROM spreekwoorden "
"ORDER BY spreekwoord COLLATE LOCALIZED"
)
To my eye, the result is nicer, at virtually no extra effort. Just don't
forget the trailing space on all but the last line.
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
back (most recent call last):
File "python", line 1, in
NameError: name 'j' is not defined
Any ideas how to debug this ?
It looks to me as if the error is right there on the first line. What is
that 'j' doing there? It looks like a typo.
HTH
Frank Mill
be rewritten as x = x +
1 to achieve a similar, but not exactly equal effect. In the augmented
version, x is only evaluated once. Also, when possible, the actual operation
is performed in-place, meaning that rather than creating a new object and
assigning that to the target, the old object is modified instead."
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
ormat(), your example would look like this -
print('{:.2f}'.format(total))
Another word of warning. Using a format specifier displays the value nicely
rounded to a number of decimal places, but the original value is unchanged.
Use the interpreter to see what the actual value is. For
ettings\frank\aib\aib_async\test_async.py", line
29, in
loop.run_forever()
File "C:\Python34\lib\asyncio\base_events.py", line 184, in run_forever
self._run_once()
File "C:\Python34\lib\asyncio\base_events.py", line 795, in _run_once
event_list = self._sele
"Ian Kelly" wrote in message
news:CALwzidnv07Wba9WJ=nuc0_v4mvudyaxwh6bgjvw0o1hf3oo...@mail.gmail.com...
> On Wed, Jun 11, 2014 at 1:19 AM, Frank Millman wrote:
>> First attempt - same as before
>>
>> loop = asyncio.get_event_loop()
>> threading.
yself I would like to know if this feels like
the right approach.
Thanks
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Ian Kelly" wrote in message
news:CALwzidmzG_WA5shw+PS4Y976M4DVTOwE=zb+kurvcpj3n+5...@mail.gmail.com...
> On Fri, Jun 13, 2014 at 5:42 AM, Frank Millman wrote:
>> Now I want to use the functionality of asyncio by using a 'yield from' to
>> suspend th
their lives made much easier by
the changes to Python3 - a 'silent majority'? I don't mean an absolute
majority, as I believe there are still more Python2 users than Python3. But
of those who have made the switch from 2 to 3, maybe most of them are quite
happy. If so, then the
Python 2.7 as an alternative to b'', to faciliate writing code that works on
both versions.
There would be a lot of overlap with b'...', but the differences could be
documented. Methods could be added to B'' to replicate any behaviour of b''
which ha
"Chris Angelico" wrote in message
news:CAPTjJmr4nPA6euD-j2uNAN==h=ids1o5bdhgj0fnjkjo9wf...@mail.gmail.com...
> On Thu, Jul 17, 2014 at 12:27 AM, Frank Millman
> wrote:
>
>> Unfortunately, human nature being what it is, the possibility of this
>> split
>>
"Chris Angelico" wrote in message
news:captjjmot9q2cuyy5jc6keycxyp8_usjhr1y8e+z+t70qnc5...@mail.gmail.com...
> On Thu, Jul 17, 2014 at 4:31 PM, Frank Millman wrote:
>> It is worth watching this -
>> https://www.youtube.com/watch?v=skYBOXE02OQ
>
> Not in a po
ng to stdout and writing to
stderr. My questions are -
1. What is the difference?
2. Is there an easy way to get stdout to behave the same as stderr?
Thanks
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Lele Gaifax" wrote in message
news:87lhrl28ie.fsf@nautilus.nautilus...
> "Frank Millman" writes:
>
>> Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32
>> bit
>> (In
>> tel)] on win32
>> Type "help",
"Steven D'Aprano" wrote in message
news:53ce0b96$0$29897$c3e8da3$54964...@news.astraweb.com...
> On Tue, 22 Jul 2014 08:18:08 +0200, Frank Millman wrote:
>
>> Hi all
>>
>> This is not important, but I would appreciate it if someone could
>> expla
"Lele Gaifax" wrote in message
news:87d2cx271o.fsf@nautilus.nautilus...
> "Frank Millman" writes:
>
>>> No, both statements actually emit noise on the standard output, but the
>>> former prints the *repr* of the string, the latter tries to encode it
"Peter Otten" <__pete...@web.de> wrote in message
news:lql3am$2q7$1...@ger.gmane.org...
> Frank Millman wrote:
>
>> Hi all
>>
>> This is not important, but I would appreciate it if someone could explain
>> the following, run from cmd.exe on Windows
"Peter Otten" <__pete...@web.de> wrote in message
news:lql9oi$hlt$1...@ger.gmane.org...
> Frank Millman wrote:
>
[...]
>
>> Out of interest, does the same thing happen when writing to sys.stderr?
>
> If you are asking about the fallback mechanism, that is
'x' goes out of scope, the generator is
garbage collected, even though it never completed.
Is this correct?
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list
"Peter Otten" <__pete...@web.de> wrote in message
news:lr7ilg$de4$1...@ger.gmane.org...
> Frank Millman wrote:
>
>> Hi all
>>
>> Python 3.4.1
>>
>> Here is a simple generator -
>>
>> def test():
>> print('start&
401 - 500 of 777 matches
Mail list logo