match point

2015-12-22 Thread Thierry

Hi,

Reading the docs about regular expressions, I am under the impression
that calling
re.match(pattern, string)
is exactly the same as
re.search(r'\A'+pattern, string)

Same for fullmatch, that amounts to
re.search(r'\A'+pattern+r'\Z', string)

The docs devote a chapter to "6.2.5.3. search() vs. match()", but they
only discuss how match() is different from search() with '^', completely
eluding the case of search() with r'\A'.

At first I thought those functions could have been introduced at a time
when r'\A' and r'\Z' did not exist, but then I noticed that re.fullmatch
is a recent addition (python 3.4)

Surely the python devs are not cluttering the interface of the re module
with useless functions for no reason, so what am I missing?

Maybe re.match has an implementation that makes it more efficient? But
then why would I ever use r'\A', since that anchor makes a pattern match
in only a single position, and is therefore useless in functions like
re.findall, re.finditer or re.split?

Thanks,

Thierry


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: match point

2015-12-22 Thread Chris Angelico
On Tue, Dec 22, 2015 at 9:56 PM, Thierry  wrote:
> Maybe re.match has an implementation that makes it more efficient? But
> then why would I ever use r'\A', since that anchor makes a pattern match
> in only a single position, and is therefore useless in functions like
> re.findall, re.finditer or re.split?

Much of the value of regular expressions is that they are NOT string
literals (just strings). Effectively, someone who has no authority to
change the code of the program can cause it to change from re.search
to re.match, simply by putting \A at the beginning of the search
string.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: In Python 3, how to append a nested dictionary to a shelve file with the added difficulty of using a for loop?

2015-12-22 Thread Peter Otten
Aaron Christensen wrote:

> Thanks for the response!  Several things you stated definitely got me
> thinking.  I really appreciate the response.  I used what you said and I
> am able to accomplish what I needed.

Perhaps it becomes clearer when you write two helper functions

def read_record(key):
return db[key]

def write_record(key, value):
db[key] = value

Changing a person's data then becomes

person_data = read_record("person_1")
person_data["age"] = 123
write_record("person_1", person_data)

Also, I was mostly paraphrasing

>>> help(shelve)

so you might read that, too.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: match point

2015-12-22 Thread Thomas 'PointedEars' Lahn
Thierry wrote:

> Reading the docs about regular expressions, I am under the impression
> that calling
> re.match(pattern, string)
> is exactly the same as
> re.search(r'\A'+pattern, string)

Correct.
 
> Same for fullmatch, that amounts to
> re.search(r'\A'+pattern+r'\Z', string)

Correct.
 
> The docs devote a chapter to "6.2.5.3. search() vs. match()", but they
> only discuss how match() is different from search() with '^', completely
> eluding the case of search() with r'\A'.
> 
> At first I thought those functions could have been introduced at a time
> when r'\A' and r'\Z' did not exist, but then I noticed that re.fullmatch
> is a recent addition (python 3.4)
> 
> Maybe re.match has an implementation that makes it more efficient? But
> then why would I ever use r'\A', since that anchor makes a pattern match
> in only a single position, and is therefore useless in functions like
> re.findall, re.finditer or re.split?

(Thank you for pointing out “\A” and “\Z”; this strongly suggests that even 
in raw mode you should always match literal “\” with the regular expression 
“\\”, or IOW that you should always use re.escape() when constructing 
regular expressions from arbitrary strings for matching WinDOS/UNC paths, 
for example.)

If you would use

  re.search(r'\Afoo.*^bar$.*baz\Z', string, flags=re.DOTALL | re.MULTILINE)

you could match only strings that start with “foo”, have a line following 
that which contains only “bar”, and end with “baz”.  (In multi-line mode, 
the meaning of “^” and “$” change to start-of-line and end-of-line, 
respectively.)

Presumably, re.fullmatch() was introduced in Python 3.4 so that you can 
write

  re.fullmatch(r'foo.*^bar$.*baz', string, flags=re.DOTALL | re.MULTILINE)

instead, since you are not actually searching, and would make sure that you 
*always* want to match against the whole string, regardless of the 
expression.

| Note that even in MULTILINE mode, re.match() will only match at the 
| beginning of the string and not at the beginning of each line.

and that

| re.search(pattern, string, flags=0)
|   Scan through string looking for the first location where the regular 
|   expression pattern produces a match […]

So with both re.search() and re.fullmatch(), you are more flexible should 
the expression be dynamically constructed: you can always use re.search().



Please add your last name, Thierry #1701.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Ignore error with non-zero exit status

2015-12-22 Thread Thomas 'PointedEars' Lahn
Terry Reedy wrote:

> On 12/21/2015 9:05 AM, Thomas 'PointedEars' Lahn wrote:
>> Chris Angelico wrote:
>>> On Tue, Dec 22, 2015 at 12:19 AM, Thomas 'PointedEars' Lahn
>>>  wrote:
 Mark Lawrence wrote:
> On 21/12/2015 07:51, Thomas 'PointedEars' Lahn wrote:
>> Chris Angelico wrote:
>>> But it's been clearly stated that .format is not going to do away
>>> with percent formatting, and all language of "new-style formatting"
>>> has been removed so as not to cause confusion.
>> Wishful thinking, twice.
> http://www.gossamer-threads.com/lists/python/dev/969817
 What is this supposed to be evidence of?
>>> Proof that percent formatting isn't planned for deprecation, much less
>>> removal.
>> Then it would have failed to accomplish that.
>>
>>> There is strong support for it in certain quarters of python-dev. […]
>> There *was*.  The referred thread is from 2012-02.  It is 2015-12.
> 
> Nothing has changed since except for
> https://www.python.org/dev/peps/pep-0498/
> already added to 3.6.

Interesting – and disturbing that for lack of deprecation of the other two 
ways we would then have *three* ways.

But irrelevant evidence, again.

[I do not understand why that is so hard to understand: In order to 
substantiate the original statement, it has to be shown *what the statement 
says*: that it would have been “clearly stated that .format is not going to 
do away with percent formatting, and all language of "new-style formatting" 
has been removed so as not to cause confusion.”.  Everything and anything 
short of showing that *fails* to constitute *relevant* evidence for that 
statement.]

> If the 2.7 doc still implies that % -formatting is deprecated, it should
> changed as in the 3.x docs.

IBTD.  What about

,-
| 
| […]
| There should be one-- and preferably only one --obvious way to do it.

?

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Newbie XML problem

2015-12-22 Thread jmp

On 12/22/2015 05:29 AM, KP wrote:


 From my first foray into XML with Python:

I would like to retrieve this list from the XML upon searching for the 'config' 
with id attribute = 'B'


config = {id: 1, canvas: (3840, 1024), comment: "a comment",
  {id: 4, gate: 3, (0,0, 1280, 1024)},
  {id: 5, gate: 2, (1280, 0, 2560, 1024)},
  {id: 6, gate: 1, (2560, 0, 3840, 1024)}}

I have started to use this code - but this is beginning to feel very 
non-elegant; not the cool Python code I usually see...

import xml.etree.ElementTree as ET

tree   = ET.parse('master.xml')
master = tree.getroot()

for config in master:
 if config.attrib['id'] == 'B':
 ...


It much depends on

1/ the xml parser you use.
2/ the xml structure

1/ I'm happily using beautifulSoup. Using it is really simple and yield 
simple code.


2/ Whenever the code gets complicated is because the xml is not properly 
structured. For instance in you example, 'id' is an attribute of 
'config' nodes, that's fine, but for 'panel' nodes it's a child node.
There's no point using a node when only one 'id' can be specified. 
Filtering by attributes is much easier than by child nodes.


Anyway here's an example of using beautifulSoup:
python 2.7 (fix the print statement if you're using python3)

import bs4

xmlp = bs4.BeautifulSoup(open('test.xml', 'r'), 'xml')

# print all canvas
for cfg in xmlp.findAll('config'):
print cfg.canvas.text

# find config B panel 6 coordinates
xmlp.find('config', id='B').find(lambda node: node.name=='panel' and 
node.id.text=='6').coordinates.text


# if panel id were attributes:
xmlp.find('config', id='B').find('panel', id='6').coordinates.text

If you can change the layout of the xml file it's better that you do, 
put every values as attribute whenever you can:




   comments can span
 on multiple lines, you probably need a node
  
  



Properly structured xml will yield proper python code.

cheers,

JM






--
https://mail.python.org/mailman/listinfo/python-list


Re: Meaning and purpose of the Subject field

2015-12-22 Thread Thomas 'PointedEars' Lahn
Random832 wrote:

> This makes sense for the change from "old" to "new (was: old)",
> which nobody was advocating against (after all, there's semantic
> content - they wouldn't have changed the subject line if they
> didn't consider it a new discussion topic), but I think there is
> a reasonable argument that changing it a second time from
> "new (was: old)" to "new" is frivolous.

Nonsense.  It is complete nonsense to carry around the old Subject
for the rest of the thread.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
-- 
https://mail.python.org/mailman/listinfo/python-list


0x80070570-The file or directory is corrupted and unreadable

2015-12-22 Thread muizz hasan
Hi there! I've been recently trying to install Python for Windows 10
and I've been encountering some issues. Every time i try to install
the program it just says"0x80070570-The file or directory is corrupted
and unreadable". I have attached my log file and i hope that you guys
might enlighten me on how to solve my problem. Thank you!
[185C:1F94][2015-12-22T19:28:35]i001: Burn v3.10.0.2103, Windows v10.0 (Build 
10240: Service Pack 0), path: F:\hacks\softwares\python-3.5.1.exe
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'ActionLikeInstalling' to value 'Installing'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'ActionLikeInstallation' to value 'Setup'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'ShortVersion' to value '3.5'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'ShortVersionNoDot' to value '35'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 'WinVer' to 
value '3.5-32'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'WinVerNoDot' to value '35-32'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'InstallAllUsers' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'InstallLauncherAllUsers' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 'TargetDir' 
to value ''
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'DefaultAllUsersTargetDir' to value '[ProgramFilesFolder]Python[WinVerNoDot]'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'TargetPlatform' to value 'x86'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'DefaultJustForMeTargetDir' to value 
'[LocalAppDataFolder]Programs\Python\Python[WinVerNoDot]'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'OptionalFeaturesRegistryKey' to value 
'Software\Python\PythonCore\[WinVer]\InstalledFeatures'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'TargetDirRegistryKey' to value 
'Software\Python\PythonCore\[WinVer]\InstallPath'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'DefaultCustomTargetDir' to value ''
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'InstallAllUsersState' to value 'enabled'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'InstallLauncherAllUsersState' to value 'enabled'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'CustomInstallLauncherAllUsersState' to value '[InstallLauncherAllUsersState]'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'TargetDirState' to value 'enabled'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'CustomBrowseButtonState' to value 'enabled'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_core' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_exe' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_dev' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_lib' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_test' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_doc' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_tools' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_tcltk' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_pip' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_launcher' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'Include_launcherState' to value 'enabled'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_symbols' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'Include_debug' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'LauncherOnly' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'DetectedLauncher' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'DetectedOldLauncher' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'AssociateFiles' to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 'Shortcuts' 
to value '1'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'PrependPath' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'CompileAll' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing numeric variable 
'SimpleInstall' to value '0'
[185C:1F94][2015-12-22T19:28:35]i000: Initializing string variable 
'SimpleInstallDescription' to value ''
[185C:1

Re: What could cause a plot fail in my code?

2015-12-22 Thread Denis McMahon
On Mon, 21 Dec 2015 09:15:38 -0800, Robert wrote:

> Hi,
> 
> I find a useful code snippet on link:
> 
> http://stackoverflow.com/questions/25126444/logistic-regression-in-
pymc/34400966#34400966
> 
> but it has error on plot function. The error message is as following:

>6192 ymin = np.amin(m[m != 0])
>6193 # filter out the 0 height bins
> -> 6194 ymin = max(ymin*0.9, minimum) if not input_empty
> else minimum
>6195 ymin = min(ymin0, ymin)
>6196 self.dataLim.intervaly = (ymin, ymax)
> 
> UnboundLocalError: local variable 'ymin' referenced before assignment
> /
> 
> I have no clue at all on debug it. Could you help me?
> Thanks,

It looks as if ymin may be defined in a conditional block, and you've 
managed to reach line 6194 without going through that block.

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: return from function

2015-12-22 Thread Denis McMahon
On Sun, 20 Dec 2015 12:34:40 +, Emil Natan wrote:

> I'm completely new to Python.

> parent_domain = domainname.partition('.')[2]
> try:
> print('Test for parent domain %s' % parent_domain)
> z = dns.resolver.query(parent_domain, 'SOA')
> print('the parent domain we use is: %s' % parent_domain)
> return parent_domain
> except dns.resolver.NXDOMAIN:
> print('NXDOMAIN: invoke find_parent_domain recursively')
> find_parent_domain(parent_domain)

None is being returned in this case!

> except dns.resolver.NoAnswer:
> print('NoAnswer: invoke find_parent_domain recursively')
> find_parent_domain(parent_domain)

And in this case.

Do you want to return None in the NXDOMAIN and NoAnswer cases? If not, a 
return statement might help in returning a value.

When you recurse back into a function you still need to return the result 
of the recursion.

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status)

2015-12-22 Thread Grant Edwards
On 2015-12-21, Steven D'Aprano  wrote:

> So as far as I am concerned, if changes of subject line breaks threading for
> you, so sad, too bad. Go without threading or use a better mail client.

Same here.  After getting what is effectively a "F*&# Y*& I'm too lazy
to do things right" from multiple people every day for the past 20
years, I think they deserve to be treated with equal respect.

-- 
Grant Edwards   grant.b.edwardsYow! I'm thinking about
  at   DIGITAL READ-OUT systems
  gmail.comand computer-generated
   IMAGE FORMATIONS ...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Library function to encode data to multipart/form-data format?

2015-12-22 Thread Grant Edwards
On 2015-12-21, Laura Creighton  wrote:
> In a message of Mon, 21 Dec 2015 17:51:00 +, Grant Edwards writes:
>>Is there a standard library function that can be used to encode data
>>into multipart/form-data format?  IIRC, I looked for this once before
>>and didn't find anything in the library. 
[...]

> Cannibalise this:
> http://code.activestate.com/recipes/146306/
> which just uses standard library things.

Yep, that's what I ended up doing.  I noticed that the code referenced
above doesn't check to make sure the boundary string is not contained
in the data, so I fixed that.

-- 
Grant Edwards   grant.b.edwardsYow! I'm gliding over a
  at   NUCLEAR WASTE DUMP near
  gmail.comATLANTA, Georgia!!
-- 
https://mail.python.org/mailman/listinfo/python-list


unicodedata with chr() not the same between python 3.4 and 3.5

2015-12-22 Thread Vincent Davis
​I was expecting the code below to be the same between python3.4 and 3.5. I
need a mapping between the integers and unicode that is consistant between
3.4 and 3.5

>>>
import unicodedata
>>>
u = ''.join(chr(i) for i in range(65536) if (unicodedata.category(chr(i))
in ('Lu', 'Ll')))[945:965]
>>> u
'ԡԢԣԤԥԦԧԨԩԪԫԬԭԮԯԱԲԳԴԵ'

Python 3.4
>>>
import unicodedata
>>>
u = ''.join(chr(i) for i in range(65536) if (unicodedata.category(chr(i))
in ('Lu', 'Ll')))[945:965]
>>> u
'ԢԣԤԥԦԧԱԲԳԴԵԶԷԸԹԺԻԼԽԾ'

As you can see they are not the same
​.​


'ԡԢԣԤԥԦԧԨԩԪԫԬԭԮԯԱԲԳԴԵ'
'ԢԣԤԥԦԧԱԲԳԴԵԶԷԸԹԺԻԼԽԾ'




Vincent Davis
720-301-3003
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status)

2015-12-22 Thread Ian Kelly
On Tue, Dec 22, 2015 at 8:17 AM, Grant Edwards  wrote:
> On 2015-12-21, Steven D'Aprano  wrote:
>
>> So as far as I am concerned, if changes of subject line breaks threading for
>> you, so sad, too bad. Go without threading or use a better mail client.
>
> Same here.  After getting what is effectively a "F*&# Y*& I'm too lazy
> to do things right" from multiple people every day for the past 20
> years, I think they deserve to be treated with equal respect.

Can you elaborate? If there's something I could be doing better in my
communications, I'm happy to entertain it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: unicodedata with chr() not the same between python 3.4 and 3.5

2015-12-22 Thread Chris Angelico
On Wed, Dec 23, 2015 at 2:27 AM, Vincent Davis  wrote:
> I was expecting the code below to be the same between python3.4 and 3.5. I
> need a mapping between the integers and unicode that is consistant between
> 3.4 and 3.5
>

> import unicodedata

> u = ''.join(chr(i) for i in range(65536) if (unicodedata.category(chr(i))
> in ('Lu', 'Ll')))[945:965]

Not sure why you're slicing it like this, but it makes little
difference. The significant thing here is that the newer Pythons are
shipping newer Unicode data files, and some code points have changed
category.

rosuav@sikorsky:~$ python3.4
Python 3.4.2 (default, Oct  8 2014, 10:45:20)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import unicodedata
>>> unicodedata.unidata_version
'6.3.0'
>>>
rosuav@sikorsky:~$ python3.5
Python 3.5.0b1+ (default:7255af1a1c50+, May 26 2015, 00:39:06)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import unicodedata
>>> unicodedata.unidata_version
'7.0.0'
>>>
rosuav@sikorsky:~$ python3.6
Python 3.6.0a0 (default:6e114c4023f5, Dec 20 2015, 19:15:28)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import unicodedata
>>> unicodedata.unidata_version
'8.0.0'
>>>

Have a read here of what changed in those two major versions:

http://unicode.org/versions/Unicode7.0.0/
http://unicode.org/versions/Unicode8.0.0/

I'm not sure what the best way is to create the mapping you want, but
I would advise freezing it to a specific set of codepoints in your
source code, rather than depending on something external.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: (Execution) Termination bit, Alternation bit.

2015-12-22 Thread Skybuck Flying



"Richard Damon"  wrote in message news:QXSdy.6634$qg6.5...@fx31.iad...

On 12/21/15 7:40 AM, Skybuck Flying wrote:

The original idea I posted is less about sending a signal to another
processor.

It is more about how to break out of an instruction sequence.

Example of problem:

[snip]

Bye,
  Skybuck.


"
The issue is that if your threads are doing real work, the cleanup
needed at each point keep the environment clean for other threads likely
varies. Just arbitrarily stopping or blindly going off to something else
is very apt to create problems.

Some languages can be better at automatically cleaning up for you, these
will tend to be languages that support some form of exception
processing, as that tends to need similar support. You abort can be
treated as a type of exception that is automatically thrown when signaled.

The problem here is that most programs, while they can handle exceptions
in many spots, have some spots where exceptions will cause problems,
especially in code that is directly managing the resources. Thus, you
still need to have some definition of where to check for the breaks.
"

I can imagine that arbitrarily terminating somewhere can lead to problems 
for example in memory clean up code, where then memory leaks might occur.


Though applications do sometimes seem to clean up anyway.

One idea which immediatly comes to mind to fix this problem is to offer a 
"PushTerminationFlag" onto stack and then a "ClearTerminationFlag" 
instruction.


Then a code section can be executed without breaking or terminating.

Once that's done the code would then call "PopTerminationFlag".

At least this offers some protection against arbitrarely breaking code 
sections.


Bye,
 Skybuck.


--
https://mail.python.org/mailman/listinfo/python-list


Re: (Execution) Termination bit, Alternation bit.

2015-12-22 Thread Chris Angelico
On Wed, Dec 23, 2015 at 2:46 AM, Skybuck Flying  wrote:
> One idea which immediatly comes to mind to fix this problem is to offer a
> "PushTerminationFlag" onto stack and then a "ClearTerminationFlag"
> instruction.
>
> Then a code section can be executed without breaking or terminating.
>
> Once that's done the code would then call "PopTerminationFlag".
>
> At least this offers some protection against arbitrarely breaking code
> sections.

Congratulations! You've just rediscovered 'critical sections'. So...
what happens if there's a programming bug that means you fail to pop
the termination flag? Wouldn't it be so nice if you could use...
exception handling?

Here on python-list/comp.lang.python, we have all those high level
facilities. We don't need new CPU-level features to make this work.
Are you massively cross-posting? Either way, this is pretty off-topic
for here. Read up a bit on what's already been done (most of what
you're talking about was already solved back in the 1990s when I was
programming on OS/2, and I'm pretty sure the solutions were all lifted
directly from mainframe research in previous decades), or just use
high level languages and save yourself a boatload of trouble.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: 0x80070570-The file or directory is corrupted and unreadable

2015-12-22 Thread eryk sun
On Tue, Dec 22, 2015 at 8:02 AM, muizz hasan  wrote:
> Hi there! I've been recently trying to install Python for Windows 10
> and I've been encountering some issues. Every time i try to install
> the program it just says"0x80070570-The file or directory is corrupted
> and unreadable". I have attached my log file and i hope that you guys
> might enlighten me on how to solve my problem. Thank you!

Try downloading a new copy of the installer. Clear your browser cache first.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status)

2015-12-22 Thread Tim Chase
On 2015-12-21 23:24, Jon Ribbens wrote:
> That sounds a bit confused - if the *intention* of changing the
> subject line is to create a new thread, then breaking the thread
> is not "breaking threading" ;-)

I'm pretty sure that the purpose is not to *break* the thread, but to
suggest that the sub-thread's topic has shifted away that of the
parent thread.

-tkc


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: match point

2015-12-22 Thread Thierry Closen

I found the story behind the creation of re.fullmatch(). 

I had no luck before because I was searching under "www.python.org/dev",
while in reality it sprang out of a bug report:
https://bugs.python.org/issue16203

In summary, there were repeated bugs where during maintenance of code
the $ symbol disappeared from patterns, hence the decision to create a
function that anchors the pattern to the end of the string independently
of the presence of that symbol.

I am perplexed by what I discovered, as I would never have thought that
such prominent functions can be created to scratch such a minor itch:
The creation of fullmatch() might address this very specific issue, but 
I would tend to think that if really certain symbols disappear from
patterns inside a code base, this should be seen as the sign of more
profound problems in the code maintenance processes.

Anyway, the discussion around that bug inspired me another argument that
is more satisfying:

When I was saying that
re.fullmatch(pattern, string)
is exactly the same as
re.search(r'\A'+pattern+r'\Z', string)
I was wrong.

For example if pattern starts with an inline flag like (?i), we cannot
simply stick \A in front of it.

Other example, consider pattern is 'a|b'. We end up with:
re.search(r'\Aa|b\Z', string)
which is not what we want.

To avoid that problem we need to add parentheses:
re.search(r'\A('+pattern+r')\Z', string)
But now we created a group, and if the pattern already contained groups
and backreferences we may just have broken it.

So we need to use a non-capturing group:
re.search(r'\A(?:'+pattern+r')\Z', string)
...and now I think we can say we are at a level of complexity where we
cannot reasonably expect the average user to always remember to write
exactly this, so it makes sense to add an easy-to-use fullmatch function
to the re namespace.

It may not be the real historical reason behind re.fullmatch, but
personally I will stick with that one :)

Cheers,

Thierry


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: 0x80070570-The file or directory is corrupted and unreadable

2015-12-22 Thread eryk sun
On Tue, Dec 22, 2015 at 11:51 AM, Dennis Lee Bieber
 wrote:
>
> http://www.tech-faq.com/how-to-fix-error-0x80070570.html
> suggests a registry cleaner (my preference over downloading some
> unknown/unvetted "repair" tool)
>
> Most of the links on Google are for getting the error when installing
> Win7 itself.

The log says "Error 0x80070570: Failed to extract all files from
container, erf: 1:4:0". 0x80070570 is a failure code for the Windows
API (facility code 7) with the error value ERROR_FILE_CORRUPT
(0x0570). The simplest recourse at this point is to clear the browser
cache and download the installer again.

Here's a program from Microsoft to check MD5 sums. You can copy
fciv.exe to the Windows directory.

https://www.microsoft.com/en-us/download/details.aspx?id=11533

Then verify that the MD5 sum is 4d6fdb5c3630cf60d457c9825f69b4d7, as
posted on python.org:

>fciv python-3.5.1.exe
//
// File Checksum Integrity Verifier version 2.05.
//
4d6fdb5c3630cf60d457c9825f69b4d7 python-3.5.1.exe

Of course, the file could be fine and this error could be just a
symptom of another problem.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Newbie XML problem

2015-12-22 Thread KP

Thank you both - your help is much appreciated!
-- 
https://mail.python.org/mailman/listinfo/python-list


imshow keeps crashhing

2015-12-22 Thread norouzey
Hello everyone,

Can anyone please help me with "imshow"? I have tried "imshow" on different 
computers and different Python consoles but it does not work. Here are the code 
and the error message:

import scipy.misc as mi
img = mi.imread('C:\images\circles.png')
mi.imshow(img)

'see' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File "", line 1, in 
  File 
"C:\...\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
 line 699, in runfile
execfile(filename, namespace)
  File 
"C:\...\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
 line 74, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
  File "C:/.../.spyder2/temp.py", line 11, in 
mi.imshow(img)
  File "C:\...\Anaconda2\lib\site-packages\scipy\misc\pilutil.py", line 389, in 
imshow
raise RuntimeError('Could not execute image viewer.')
RuntimeError: Could not execute image viewer.

Thanks a lot for your time.

Ahmad
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: imshow keeps crashhing

2015-12-22 Thread John Gordon
In  norou...@gmail.com 
writes:

> Can anyone please help me with "imshow"? I have tried "imshow" on different 
> computers and different Python consoles but it does not work. Here are the 
> code and the error message:

> import scipy.misc as mi
> img = mi.imread('C:\images\circles.png')
> mi.imshow(img)

> 'see' is not recognized as an internal or external command,
> operable program or batch file.

scipy calls an external image viewer program to display the image.

The name of this program is stored in the environment variable
SCIPY_PIL_IMAGE_VIEWER.  If that variable is not present, it uses
'see' by default.

Do you have a suitable image viewing program installed on your computer?
If so, try setting the SCIPY_PIL_IMAGE_VIEWER environment variable to the
name of that program.

-- 
John Gordon   A is for Amy, who fell down the stairs
gor...@panix.com  B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

-- 
https://mail.python.org/mailman/listinfo/python-list


How to use a variable to act as @rule in a Sopel IRC bot module?

2015-12-22 Thread arresteddevlopment

Hi everyone. I'm working with the Sopel (previously Willie and before that, 
Jenni/Phenny) python IRC bot as I'd like to set up a trivia quiz for our IRC 
channel.

With Sopel, the @rule decorator lets you set a string that the bot will 
listen out for and which triggers a corresponding function when encountered. 
So for the quiz I'd like the bot to confirm a correct answer by saying 
"Correctamundo!" when someone gets the question right.





A. The first thing I tried was a nested function. After choosing a random 
question from the q_and_as tuples list, it sets the answer (q[1]) as the rule 
that should trigger the correct() function.



from sopel.module import commands, ruleimport randomq_and_as = [('Why?', 
'because'), ('Can I kick it?', 'nope')]@commands("quizme")def ask_q(bot, 
trigger):q = random.choice(q_and_as)bot.say(q[0])@rule(q[1])
def correct(bot, trigger):bot.sat('Correctamundo!')


For whatever reason the answer isn't triggering the correct() function when 
done this way.




B. I also tried passing the answer (q[1]) to a separate answer function, 
which would then set it as the rule that triggered the correct() function.



from sopel.module import commands, ruleimport randomq_and_as = [('Why?', 
'because'), ('Can I kick it?', 'nope')]@commands("quizme")def ask_q(bot, 
trigger):q = random.choice(q_and_as)bot.say(q[0])answer(bot, 
trigger, q[1])def answer(bot, trigger, answer):@rule(answer)def 
correct(bot, trigger):bot.say(' correctamundo!')


Again though, the function isn't being triggered. Any ideas where I'm going 
wrong? Or is there a better way of doing this? Thank you.
 
-- 
https://mail.python.org/mailman/listinfo/python-list


unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-22 Thread Nicky Mac
I have run the install (and repair) which explicitly includes Tcl/Tk and l
have this problem:

Microsoft Windows [Version 10.0.10586] (c) 2015 Microsoft Corporation. All
rights reserved.

>C:\Python\Python35\python.exe -m idlelib
** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **

Please suggest how this can be fixed
any support greatly appreciated

Nick  McElwaine
-- 
https://mail.python.org/mailman/listinfo/python-list


Newbie: String to Tuple

2015-12-22 Thread KP
How do I convert

'1280,1024'

to

(1280,1024) ? 

Thanks for all help!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Newbie: String to Tuple

2015-12-22 Thread Mark Lawrence

On 22/12/2015 20:53, KP wrote:

How do I convert

'1280,1024'

to

(1280,1024) ?

Thanks for all help!



Start with this https://docs.python.org/3/library/stdtypes.html#str.split

--
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


Re: Newbie: String to Tuple

2015-12-22 Thread Peter Otten
KP wrote:

> How do I convert
> 
> '1280,1024'
> 
> to
> 
> (1280,1024) ?


>>> import ast
>>> ast.literal_eval('1280,1024')
(1280, 1024)


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Newbie: String to Tuple

2015-12-22 Thread KP
On Tuesday, 22 December 2015 12:59:59 UTC-8, Mark Lawrence  wrote:
> On 22/12/2015 20:53, KP wrote:
> > How do I convert
> >
> > '1280,1024'
> >
> > to
> >
> > (1280,1024) ?
> >
> > Thanks for all help!
> >
> 
> Start with this https://docs.python.org/3/library/stdtypes.html#str.split
> 
> -- 
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence

Thanks - just what I was missing!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to use a variable to act as @rule in a Sopel IRC bot module?

2015-12-22 Thread arresteddevlopment
Apologies for the terrible formatting, let me try that again:

A:
from sopel.module import commands, rule
import random

q_and_as = [('Why?', 'because'), ('Can I kick it?', 'nope')]

@commands("quizme")
def ask_q(bot, trigger):
 q = random.choice(q_and_as)
 bot.say(q[0])
 @rule(q[1])
 def correct(bot, trigger):
 bot.sat('Correctamundo!')

B:
...
@commands("quizme")
def ask_q(bot, trigger):
 q = random.choice(q_and_as)
 bot.say(q[0])
 answer(bot, trigger, q[1])

def answer(bot, trigger, answer):
 @rule(answer)
 def correct(bot, trigger):
 bot.say(' correctamundo!')

If the above comes out wonky again I also asked on StackOverflow 
(http://stackoverflow.com/questions/34419265/how-to-set-and-later-change-a-rule-in-a-sopel-irc-bot-module-python).
 
Any help would be greatly appreciated.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-22 Thread Terry Reedy


On 12/22/2015 3:27 PM, Nicky Mac wrote:

I have run the install (and repair) which explicitly includes Tcl/Tk and l
have this problem:


First, I would download and install the final 3.5.1. I believe there was 
a change to the installer that might, possibly, make a difference.


Write down exactly the install options you choose.


C:\Python\Python35\python.exe -m idlelib

** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **


Then run python -m tkinter to remove IDLE from the issue.
If problem persists, report again.


Please suggest how this can be fixed
any support greatly appreciated


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Meaning and purpose of the Subject field (was: Ignore error with non-zero exit status)

2015-12-22 Thread Grant Edwards
On 2015-12-22, Ian Kelly  wrote:
> On Tue, Dec 22, 2015 at 8:17 AM, Grant Edwards  
> wrote:
>> On 2015-12-21, Steven D'Aprano  wrote:
>>
>>> So as far as I am concerned, if changes of subject line breaks threading for
>>> you, so sad, too bad. Go without threading or use a better mail client.
>>
>> Same here.  After getting what is effectively a "F*&# Y*& I'm too lazy
>> to do things right" from multiple people every day for the past 20
>> years, I think they deserve to be treated with equal respect.
>
> Can you elaborate? If there's something I could be doing better in my
> communications, I'm happy to entertain it.

I was talking about the general case of people who top-post, send
html-only, misidentified charsets, incorrect file types, attach all
sorts of company logos, "intendended-recipient" boilerplate, and so
on.  Once in a while, you just can't take it any longer and have to do
"the right thing" and let all the people with broken MUAs, NNTP
clients, or brains deal with it...

-- 
Grant Edwards   grant.b.edwardsYow! Somewhere in DOWNTOWN
  at   BURBANK a prostitute is
  gmail.comOVERCOOKING a LAMB CHOP!!
-- 
https://mail.python.org/mailman/listinfo/python-list


Newbie: Convert strings in nested dict to tuples

2015-12-22 Thread KP
I now know how to convert a string cont. coordinates to a tuple, but hwo can I 
do this?

Given

cfg = {'canvas': ('3840', '1024'),
  'panel1': {'gpio': '1', 'id': '4', 'co': '0,0,1280,1024'}, 
  'panel2': {'gpio': '2', 'id': '5', 'co': '1280,0,2560,1024'},
  'panel3': {'gpio': '3', 'id': '6', 'co': '2560,0,3840,1024'}}

how can I transform cfg to 

cfg = {'canvas': ('3840', '1024'),
  'panel1': {'gpio': '1', 'id': '4', 'co': ('0','0','1280','1024')}, 
  'panel2': {'gpio': '2', 'id': '5', 'co': ('1280','0','2560','1024')},
  'panel3': {'gpio': '3', 'id': '6', 'co': ('2560','0','3840','1024')}}

Again, thanks for all help!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Newbie: Convert strings in nested dict to tuples

2015-12-22 Thread Peter Otten
KP wrote:

> I now know how to convert a string cont. coordinates to a tuple, but hwo
> can I do this?
> 
> Given
> 
> cfg = {'canvas': ('3840', '1024'),
>   'panel1': {'gpio': '1', 'id': '4', 'co': '0,0,1280,1024'},
>   'panel2': {'gpio': '2', 'id': '5', 'co': '1280,0,2560,1024'},
>   'panel3': {'gpio': '3', 'id': '6', 'co': '2560,0,3840,1024'}}
> 
> how can I transform cfg to
> 
> cfg = {'canvas': ('3840', '1024'),
>   'panel1': {'gpio': '1', 'id': '4', 'co': ('0','0','1280','1024')},
>   'panel2': {'gpio': '2', 'id': '5', 'co':
>   ('1280','0','2560','1024')}, 'panel3': {'gpio': '3', 'id': '6',
>   'co': ('2560','0','3840','1024')}}
> 
> Again, thanks for all help!

>>> cfg = {'canvas': ('3840', '1024'),
...   'panel1': {'gpio': '1', 'id': '4', 'co': '0,0,1280,1024'}, 
...   'panel2': {'gpio': '2', 'id': '5', 'co': '1280,0,2560,1024'},
...   'panel3': {'gpio': '3', 'id': '6', 'co': '2560,0,3840,1024'}}
>>> 
>>> for value in cfg.values():
... if isinstance(value, dict):
... value["co"] = tuple(value["co"].split(","))
... 
>>> import pprint
>>> pprint.pprint(cfg)
{'canvas': ('3840', '1024'),
 'panel1': {'co': ('0', '0', '1280', '1024'), 'gpio': '1', 'id': '4'},
 'panel2': {'co': ('1280', '0', '2560', '1024'), 'gpio': '2', 'id': '5'},
 'panel3': {'co': ('2560', '0', '3840', '1024'), 'gpio': '3', 'id': '6'}}


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Newbie: Convert strings in nested dict to tuples

2015-12-22 Thread KP
Beautiful - thanks!

On Tuesday, 22 December 2015 15:23:25 UTC-8, Peter Otten  wrote:
> KP wrote:
> 
> > I now know how to convert a string cont. coordinates to a tuple, but hwo
> > can I do this?
> > 
> > Given
> > 
> > cfg = {'canvas': ('3840', '1024'),
> >   'panel1': {'gpio': '1', 'id': '4', 'co': '0,0,1280,1024'},
> >   'panel2': {'gpio': '2', 'id': '5', 'co': '1280,0,2560,1024'},
> >   'panel3': {'gpio': '3', 'id': '6', 'co': '2560,0,3840,1024'}}
> > 
> > how can I transform cfg to
> > 
> > cfg = {'canvas': ('3840', '1024'),
> >   'panel1': {'gpio': '1', 'id': '4', 'co': ('0','0','1280','1024')},
> >   'panel2': {'gpio': '2', 'id': '5', 'co':
> >   ('1280','0','2560','1024')}, 'panel3': {'gpio': '3', 'id': '6',
> >   'co': ('2560','0','3840','1024')}}
> > 
> > Again, thanks for all help!
> 
> >>> cfg = {'canvas': ('3840', '1024'),
> ...   'panel1': {'gpio': '1', 'id': '4', 'co': '0,0,1280,1024'}, 
> ...   'panel2': {'gpio': '2', 'id': '5', 'co': '1280,0,2560,1024'},
> ...   'panel3': {'gpio': '3', 'id': '6', 'co': '2560,0,3840,1024'}}
> >>> 
> >>> for value in cfg.values():
> ... if isinstance(value, dict):
> ... value["co"] = tuple(value["co"].split(","))
> ... 
> >>> import pprint
> >>> pprint.pprint(cfg)
> {'canvas': ('3840', '1024'),
>  'panel1': {'co': ('0', '0', '1280', '1024'), 'gpio': '1', 'id': '4'},
>  'panel2': {'co': ('1280', '0', '2560', '1024'), 'gpio': '2', 'id': '5'},
>  'panel3': {'co': ('2560', '0', '3840', '1024'), 'gpio': '3', 'id': '6'}}

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: v3.5.1 - msi download

2015-12-22 Thread jfong
Mark Lawrence at 2015/12/21 UTC+8 8:50:00PM wrote:
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.

When I saw this sentence, I can't resist to think of the famous lie created by 
president John kennedy: "Ask not what your country can do for you, ask what you 
can do for your country".

A COUNTRY WAS BUILT TO SERVE THE PEOPLE!!!

Do you think people are so boring that they have to build a country to serve to?

But there is always a bunch of idiots lost in these gorgeous words, don't even 
take a single moment to think of it, completely forgot the purpose of what a 
country was built for. The means eventually become the object, and millions of 
millions idiots sacrifice their life for this imaginary object.

A LANGUAGE WAS BUILT TO SERVE THE USER!!!


-- 
https://mail.python.org/mailman/listinfo/python-list


convert to python code

2015-12-22 Thread Rodrick Brown
Tried a few things but can't seem to get it right any help ?

let times = (...matrices) =>

  matrices.reduce(

([a,b,c], [d,e,f]) => [a*d + b*e, a*e + b*f, b*e + c*f]

  );
-- 
https://mail.python.org/mailman/listinfo/python-list


OT: citizens and countries - was Re: v3.5.1 - msi download

2015-12-22 Thread Michael Torrie
On 12/22/2015 07:06 PM, jf...@ms4.hinet.net wrote:
> Mark Lawrence at 2015/12/21 UTC+8 8:50:00PM wrote:
>> My fellow Pythonistas, ask not what our language can do for you, ask
>> what you can do for our language.
> 
> When I saw this sentence, I can't resist to think of the famous lie created 
> by president John kennedy: "Ask not what your country can do for you, ask 
> what you can do for your country".
> 
> A COUNTRY WAS BUILT TO SERVE THE PEOPLE!!!
> 
> Do you think people are so boring that they have to build a country to serve 
> to?

In the American way of thinking, the country *is* the people.  So it was
neither a lie nor a bad thing that Kennedy proclaimed.  Maybe this is
not true for other countries, but I think most Americans would feel it
is true for their country.  And indeed the sentiment that Kennedy
expressed resonates deeply with many/most Americans. A country is only
made great by citizens willing to do many things for the good of the
country and their fellow citizens.

A country in which citizens only expect things from the country and
never think about their ability to change and benefit the country is a
week country indeed.

I say this as a someone not from the US.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: convert to python code

2015-12-22 Thread Ben Finney
Rodrick Brown  writes:

> Tried a few things but can't seem to get it right any help ?

To convert it to Python code, you'll need to actually write some code.

Please show here in this forum the actual Python code which is not
behaving how you want, and say *exactly* what it's doing different from
what you expect (and, preferably, explain why you expect it to behave
differently).

-- 
 \  “Do I believe in God? … without clarification of a kind I have |
  `\never seen, I don’t know whether I believe or don’t believe in |
_o__)whatever a questioner has in mind.” —Noam Chomsky |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Why doesn't os.remove work on directories?

2015-12-22 Thread Random832

This is surprising to anyone accustomed to the POSIX C remove
function, which can remove either files or directories.  Is there
any known rationale for this decision?

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Why doesn't os.remove work on directories?

2015-12-22 Thread Ben Finney
Random832  writes:

> This is surprising to anyone accustomed to the POSIX C remove
> function, which can remove either files or directories.  Is there
> any known rationale for this decision?

No, I don't know a rationale for implementing it this way.

I expect the explanation will be “mere historical accident”. My
evidence-free reconstruction of the events leading to the current state
of play:

1.  ‘os.unlink’ implemented, using C ‘unlink(3)’. Because ‘unlink(2)’
on a directory will cause an error, Python raises OSError for this.

2.  ‘os.remove’ implemented; “This is identical to the unlink() function
documented below.”.

3.  Backward compatibility concerns (existing code might depend on
‘os.remove’ raising OSError for a directory argument) justify
keeping the existing behaviour.

What you're looking for amounts to “why was ‘os.remove’ implemented as a
synonym of ‘unlink(3)’ instead of ‘remove(3)’?”.

I don't know why that behaviour was chosen, and I consider it a wart.

-- 
 \“… no testimony can be admitted which is contrary to reason; |
  `\   reason is founded on the evidence of our senses.” —Percy Bysshe |
_o__)Shelley, _The Necessity of Atheism_, 1811 |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: does the order in which the modules are placed in a file matters ?

2015-12-22 Thread Ganesh Pal
Thanks to Don , Chris  and  Carl for sharing your view on this topic .
-- 
https://mail.python.org/mailman/listinfo/python-list