Re: immutable vs mutable

2014-06-03 Thread Mark H Harris
On 6/3/14 12:29 PM, Deb Wyatt wrote: http://www.spontaneoussymmetry.com/blog/archives/438 Deb in WA, USA The article is bogged down in unnecessary complications with regard to mutability (or not) and pass-by reference|value stuff. The author risks confusing her audience (those who are perh

Re: OT: This Swift thing

2014-06-03 Thread Mark H Harris
On 6/3/14 1:26 PM, Skip Montanaro wrote: From Apple's perspective, there's always platform lock-in. That's good for them, so it must be good for you, right? :-) http://www.theregister.co.uk/2014/06/02/apple_aims_to_speed_up_secure_coding_with_swift_programming_language/ The key to this "Swif

Re: OT: This Swift thing

2014-06-03 Thread Mark H Harris
On 6/3/14 3:43 PM, Sturla Molden wrote: Nicholas Cole wrote: > {snip} Unfortunately they retained the curly brackets from JS... The curly braces come from C, and before that B and A/. (I think others used them too before that, but it escapes me now and I'm too lazy to google it) ... but

Re: OT: This Swift thing

2014-06-04 Thread Mark H Harris
On 6/3/14 11:54 PM, Steven D'Aprano wrote: I've been passing code snippets by email and Usenet for 15 years or more, and I've never had a problem with indentation. Of course, I've had problems with *other people's code*, because they use broken tools that break the text they send. Me too.

Re: OT: This Swift thing

2014-06-04 Thread Mark H Harris
On 6/4/14 9:24 AM, Skip Montanaro wrote: Surely your local colleagues realize that Python has been around for 20-odd years now, that indentation-based block structure has been there since Day One, and that it's not going to change, right? Yup. Its the primary argument on the side for indenta

Re: immutable vs mutable

2014-06-04 Thread Mark H Harris
On 6/3/14 8:24 PM, Ethan Furman wrote: Deb, do yourself a favor and just trash-can anything from Mark Harris. Ouch, that hurt. Did someone not get their coffee this morning? :-) -- https://mail.python.org/mailman/listinfo/python-list

Re: immutable vs mutable

2014-06-04 Thread Mark H Harris
On 6/3/14 8:14 PM, Deb Wyatt wrote: Well, I'm glad you find this concept straight-forward. I guess I'm not as smart as you. Not at all. I think you misunderstood me. I read the article and I reviewed it (although brief, I stand by what I said). To expand a bit, the article is poorly writt

Re: OT: This Swift thing

2014-06-04 Thread Mark H Harris
On 6/4/14 5:18 PM, Terry Reedy wrote: On 6/4/2014 10:53 AM, Mark H Harris wrote: The primary paradigm on this topic locally is that indents are bad because malformed or mangled code cannot be reformatted easily (if at all). Begin solution:':' as the end of a line means 'begi

micro python and Jaltek systems pyboard

2015-04-23 Thread Mark H Harris
Greetings, anyone using micro python or Jaltek System's pyboard designed to run it? http://micropython.org/ Cheers, marcus :) -- https://mail.python.org/mailman/listinfo/python-list

Multi-threaded TCP server class for general use

2015-05-07 Thread mark . r . bannister
/collected by a different session, and can be woken up when the data is ready. Let me know if anyone is interested in re-using this library. Tested ok on Linux and Solaris, not tried on Windows yet. Best regards, Mark. -- https://mail.python.org/mailman/listinfo/python-list

anomaly

2015-05-10 Thread Mark Rosenblitt-Janssen
Here's something that might be wrong in Python (tried on v2.7): >>> class int(str): pass >>> int(3) '3' Mark -- https://mail.python.org/mailman/listinfo/python-list

Re: anomaly

2015-05-10 Thread Mark Rosenblitt-Janssen
fying. I hope that there's at least one person who sees the issue. Mark On 5/10/15, Mark Rosenblitt-Janssen wrote: > Here's something that might be wrong in Python (tried on v2.7): > >>>> class int(str): pass > >>>> int(3) > '3' > > Mark > -- https://mail.python.org/mailman/listinfo/python-list

Re: anomaly

2015-05-10 Thread Mark Rosenblitt-Janssen
one has to see the mix-in classes. I'm inventing a new term for this kind of inheritence: expansion. I've enclosed one class inside of another, but yet it's not quite "encapsulation" (in the C++ sense). Cheers, Mark J http://wiki.hackerspaces.org/Hacking_with_th

Re: anomaly

2015-05-10 Thread Mark Rosenblitt-Janssen
In case the example given at the start of the thread wasn't interesting enough, it also works in the other direction: >>> class str(int): pass >>> str('2') 2 #<- an integer!!! Mark -- https://mail.python.org/mailman/listinfo/python-list

Re: Error while installing PIL

2014-06-04 Thread Mark H Harris
On 6/4/14 10:02 PM, Sanjay Madhikarmi wrote: I have already install python 2.7 64bit in my windows 8 machine but while installing PIL 1.1.7 for python 2.7 it says that "Python 2.7 required which was not found in the registry" Please help me sort out this problem http://stackoverflow.com/quest

Re: Error while installing PIL

2014-06-04 Thread Mark H Harris
On 6/4/14 10:02 PM, Sanjay Madhikarmi wrote: I have already install python 2.7 64bit in my windows 8 machine but while installing PIL 1.1.7 for python 2.7 it says that "Python 2.7 required which was not found in the registry" Please help me sort out this problem ... also this one; -- https:

Re: Error while installing PIL

2014-06-04 Thread Mark H Harris
On 6/4/14 10:02 PM, Sanjay Madhikarmi wrote: I have already install python 2.7 64bit in my windows 8 machine but while installing PIL 1.1.7 for python 2.7 it says that "Python 2.7 required which was not found in the registry" ... oops, sorry, also this one: http://stackoverflow.com/questions/

Re: Unicode and Python - how often do you index strings?

2014-06-05 Thread Mark H Harris
On 6/5/14 10:39 AM, alister wrote: {snipped all the mess} And you have may time been given a link explaining the problems with posting g=from google groups but deliberately choose to not make your replys readable. The problem is that thing look fine in google groups. What helps is getting to

Re: OT: This Swift thing

2014-06-05 Thread Mark H Harris
On 6/5/14 12:18 PM, Michael Torrie wrote: No they won't be used in the same niche. Objective C is certainly not used in the same niche as Python, so why would Swift? I don't expect to see any major OS X app written completely in Python, nor would I expect and of the core frameworks to be writte

Re: First time I looked at Python was(...)

2014-06-10 Thread Mark H Harris
On 6/9/14 3:54 PM, Carlos Anselmo Dias wrote: Hi ... I'm finishing my messages with this ... The first time I looked into Python was +- 10 years ago ... and in the last 10 years I did not spent more than 30 minutes looking at ... but I like it ... it's easy to read ... even if I'm not familiar

Re: First time I looked at Python was(...)

2014-06-10 Thread Mark H Harris
On 6/10/14 3:41 PM, leo kirotawa wrote: Guys I'm from Brazil too, and I'm ashamed for this troll. Don't feed the troll bot. OTOH, it might be fun to feed it some weird subject|predicate phrases to see what it does with them. Bots eat bananas because bouncing on berries becomes beenie baby

Re: Python's re module and genealogy problem

2014-06-11 Thread Mark H Harris
On 6/11/14 8:26 AM, Robert Kern wrote: Anyways, to your new problem, yes it's possible. Search for "regular expression intersection" for possible approaches. I agree, I would not use a decision (decision tree) but would consider a set of filters from most specific to least specific. marcus

Re: About python while statement and pop()

2014-06-12 Thread Mark H Harris
On 6/11/14 10:12 PM, hito koto wrote: i want to change this is code: def foo(x): y = [] while x !=[]: y.append(x.pop()) return y Consider this generator (all kinds of permutations on the idea): >>> L1 [1, 2, 3, 4, 5, 6, 7] >>> def poplist(L): while True:

Re: About python while statement and pop()

2014-06-12 Thread Mark H Harris
On 6/11/14 10:12 PM, hito koto wrote: def foo(x): y = [] while x !=[]: y.append(x.pop()) return y Consider this generator variation: >>> def poplist(L): done = False while done==False: yield L[::-1][:1:] L = L[::-1][1::]

Re: About python while statement and pop()

2014-06-12 Thread Mark H Harris
On 6/12/14 11:55 AM, Marko Rauhamaa wrote: while not done: Better Python and not bad English, either. ... and taking Marko's good advice, what I think you really wanted: >>> def poplist(L): done = False while not done: yield L[::-1][:1:] L

Re: About python while statement and pop()

2014-06-12 Thread Mark H Harris
On 6/12/14 11:57 AM, Chris Angelico wrote: On Fri, Jun 13, 2014 at 2:49 AM, Mark H Harris wrote: Consider this generator variation: def poplist(L): done = False while done==False: yield L[::-1][:1:] L = L[::-1][1::][::-1

Re: About python while statement and pop()

2014-06-12 Thread Mark H Harris
On 6/12/14 11:57 AM, Chris Angelico wrote: def poplist(L): done = False while done==False: yield L[::-1][:1:] L = L[::-1][1::][::-1] if len(L)==0: done=True Why not just "while L"? OK, here it is with Chris' excellent adv

Re: trying idle

2014-10-10 Thread Mark H Harris
On 10/9/14 7:47 AM, [email protected] wrote: I believe control-click, but Macs users could say better. Control-click was the canonical way to do it when right click menus were introduced in Mac OS itself. Some programs (notably Netscape) supported them via click-hold before that. And it's

Re: trying idle

2014-10-10 Thread Mark H Harris
On 10/9/14 7:21 AM, [email protected] wrote: My audience consists of people having linux and windows and macbooks. Does Idle run on all these? --- No. Huh? -- https://mail.python.org/mailman/listinfo/python-list

Re: trying idle

2014-10-10 Thread Mark H Harris
On 10/9/14 1:52 AM, Rustom Mody wrote: > Been using emacs for over 20 years and teaching python for 10. > And getting fed up that my audience looks at me like Rip van Winkle > each time I start up emacs... (sigh) > So trying out Idle... Good for you! ... and even better for your students.

Re: Small program ideas

2013-02-16 Thread Mark R Rivet
On Fri, 15 Feb 2013 22:52:57 -0500, Mitya Sirenef wrote: >On 02/15/2013 10:22 PM, eli m wrote: >> Any small program ideas? I would prefer to stick to command line ones. >> Thanks. > >How about these two: > > - simulation of a street crossing with green/red lights allowing cars >and pedestrians

Re: Small program ideas

2013-02-16 Thread Mark R Rivet
On Fri, 15 Feb 2013 19:57:35 -0800 (PST), eli m wrote: >On Friday, February 15, 2013 7:52:57 PM UTC-8, Mitya Sirenef wrote: >> On 02/15/2013 10:22 PM, eli m wrote: >> >> > Any small program ideas? I would prefer to stick to command line ones. >> > Thanks. >> >> >> >> How about these two: >>

Re: Is unicode_escape broken?

2005-12-13 Thread Mark Mc Mahon
quot;, line 1, in ?UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 0: \ at end of stringTo report a bug, follow the directions at the bottom of this page:http://www.python.org/2.4.2/bugs.html Bug Logged: 1379994  (http://sourceforge.net/tracker/

Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
hat shallow copies (of objects built from immutable types) should be able to be speed up by memory mapping (somehow!). The top-level list/rule should be the only new reference that needs to be created. Any quick answers or most likely directions to explore, would be greatly appreciated. Regards

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
Michael Spencer wrote: > Mark E. Fenner wrote: > >> >> and the copy is taking the majority (42%) of my execution time. >> So, I'd like to speed up my copy. I had an explicit copy method that did >> what was needed and returned a new object, but this was q

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
John Machin wrote: > > Mark E. Fenner wrote: > >> Here's my class of the objects being copied: > > Here's a couple of things that might help speed up your __init__ > method, and hence your copy method: > >> >> class Rule(list): >> de

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
Mark E. Fenner wrote: > John Machin wrote: > >> >> Mark E. Fenner wrote: >> >>> Here's my class of the objects being copied: >> >> Here's a couple of things that might help speed up your __init__ >> method, and hence your copy me

Re: Optimizing Inner Loop Copy

2006-08-17 Thread Mark E. Fenner
danielx wrote: > > Mark E. Fenner wrote: >> Mark E. Fenner wrote: >> >> > John Machin wrote: >> > >> >> >> >> Mark E. Fenner wrote: >> >> >> >>> Here's my class of the objects being copied: >> >

Re: Optimizing Inner Loop Copy

2006-08-18 Thread Mark E. Fenner
Paul McGuire wrote: > "Mark E. Fenner" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hello all, >> > >> >> Here's my class of the objects being copied: >> >> class Rule(list): >> def __init__(s

Using cElementTree and elementtree.ElementInclude

2006-10-23 Thread Mark E. Smith
he root/included_root etree.remove(etree.find('./included_root')) dump(etree) http://www.w3.org/2001/XInclude";> Thanks for the help. Mark -- http://mail.python.org/mailman/listinfo/python-list

From bags to default dicts

2006-09-12 Thread Mark E. Fenner
etter than creating a bag class that has a defaultdict as a member. So, inheriting from defaultdict and defining some of the nice utility methods that Hettinger's class defines seems like the way to go. Comments? Regards, Mark -- http://mail.python.org/mailman/listinfo/python-list

CD insert/eject detection

2007-03-13 Thread Mark Bryan Yu
Hi, I'm trying to make a Audio CD ripper using python. is there a way (library, module, etc) to detect when a CD was inserted or ejected? -- http://mail.python.org/mailman/listinfo/python-list

Re: CD insert/eject detection

2007-03-13 Thread Mark Bryan Yu
On Mar 13, 11:07 am, Larry Bates <[EMAIL PROTECTED]> wrote: > Mark Bryan Yu wrote: > > Hi, > > > I'm trying to make a Audio CD ripper using python. > > > is there a way (library, module, etc) to detect when a CD was inserted > > or ejected? > >

Punit v 0.1 - Python CD ripper

2007-03-20 Thread Mark Bryan Yu
Here's the initial release of my personal open source project to create a Python CD ripper in Linux. Punit is a Audio CD ripper for Linux using cdparanoia, LAME and CDDB.py (http://cddb-py.sourceforge.net/) http://www.programmingmind.com/bryan/punit.html -- http://mail.python.org/mailman/listin

ANN: pywinauto 0.3.7 now released

2007-04-10 Thread Mark Mc Mahon
e wheel movements to be made. * menuwrapper.Menu.GetProperties() now returns a dict like all other GetProperties() methods. This dict for now only has one key 'MenuItems' which contains the list of menuitems (which had been the previous return value). Thanks Mark ----

Debug Build of Python

2007-02-21 Thread Mark E. Fenner
Where should these be be set? Is there a particular .h file? Are any of them implied by the debugging options to make and ./configure? Regards, Mark -- http://mail.python.org/mailman/listinfo/python-list

Python Sockets Help

2008-03-10 Thread Mark M Manning
data, addr = udps.recvfrom(1024) p=DNSQuery(data) udps.sendto(p.respuesta(ip), addr) print 'Respuesta: %s -> %s' % (p.dominio, ip) except KeyboardInterrupt: print 'Finalizando' udps.close() Thanks to everyone in advance! ~Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Sockets Help

2008-03-11 Thread Mark M Manning
That's embarrassingly simple! Thank you very much!! On Mar 11, 4:03 am, [EMAIL PROTECTED] wrote: > On 10 Mar, 23:58, Mark M Manning <[EMAIL PROTECTED]> wrote: > > > > > I need your expertise with a sockets question. > > > Let me preface this by sa

list.reverse()

2008-04-28 Thread Mark Bryan Yu
This set of codes works: >>> x = range(5) >>> x.reverse() >>> x [4, 3, 2, 1, 0] But this doesn't: >>> x = range(5).reverse() >>> print x None Please explain this behavior. range(5) returns a list from 0 to 4 and reverse just reverses the items on the list that is returned by range(5). Why is x

ANN: pywinauto 0.3.0 released - now localization proof

2006-03-20 Thread mark . m . mcmahon
that the window was active. * Fixed Bug 1452832 where clipboard was not closed in clipboard.GetData() * Added more unit tests now up to 248 from 207 If you want to follow this project then please sign up to the mailing list: https://lists.sourceforge.net/mailman/listinfo/pywinauto-users Thanks Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pywinauto 0.3.0 released - now localization proof

2006-03-21 Thread mark . m . mcmahon
or Winspector - which I use all the time. (http://www.windows-spy.com/) > > thanks, > > bryan > Thank you! Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: pywinauto 0.3.0 released - now localization proof

2006-03-21 Thread mark . m . mcmahon
or Winspector - which I use all the time. (http://www.windows-spy.com/) > > thanks, > > bryan > Thank you! Mark -- http://mail.python.org/mailman/listinfo/python-list

ANN: pywinauto 0.3.1 released - Performance tune-ups

2006-03-30 Thread mark . m . mcmahon
ken when viewed there. * Moved all timing information into the timings.Timings class. There are some simple methods for changing the timings. If you want to follow this project then please sign up to the mailing list: https://lists.sourceforge.net/mailman/listinfo/pywinauto-user

Documentation Problems

2009-07-22 Thread Mark du Preez
Hi Can anyone tell me where to go to suggest changes to the Python documentation? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-05 Thread Mark via Python-list
On Thursday, July 5, 2018 at 6:24:09 PM UTC+1, Tim Williams wrote: > On Thu, Jul 5, 2018 at 9:02 AM Mark Summerfield via Python-list < > [email protected]> wrote: > > > For GUI programming I often use Python bindings for Qt. > > > > There are two co

Re: Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-06 Thread Mark via Python-list
In the end I changed to a completely different approach. I now have two parallel directories, one with PySide-based code and the other with auto-generated PyQt-based code. And I created a tiny script to copy the PySide code to the PyQt directory & do the necessary changes. (I can post the scrip

Re: Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-06 Thread Mark via Python-list
On Friday, July 6, 2018 at 1:22:46 PM UTC+1, Bev in TX wrote: > > On Jul 6, 2018, at 3:14 AM, Mark via Python-list > > wrote: > > > > In the end I changed to a completely different approach. > > > > I now have two parallel directories, one with PySide-bas

Is pyton for me?

2005-06-09 Thread Mark de+la+Fuente
er besides python, please let me know. Thanks for your help. Mark ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! -- http://mail.python.org/mailman/listinfo/python-list

Python.org mirror

2007-09-11 Thread Stream Service || Mark Scholten
, Met vriendelijke groet, Mark Scholten Stream Service Web: http://www.streamservice.nl/ E-mail: [EMAIL PROTECTED] NOC: http://www.mynoc.eu/ NOC e-mail: [EMAIL PROTECTED] Tel.: +31 (0)642 40 86 02 Fax: +31 (0)20 20 101 57 KVK: 08141074 BTW: NL104278274B01-- http://mail.python.org/mailman/listinfo

Re: Python.org mirror

2007-09-11 Thread Stream Service || Mark Scholten
Hello, Thank you for the information, I will also contact them. With kind regards, Met vriendelijke groet, Mark Scholten Stream Service Web: http://www.streamservice.nl/ E-mail: [EMAIL PROTECTED] NOC: http://www.mynoc.eu/ NOC e-mail: [EMAIL PROTECTED] Tel.: +31 (0)642 40 86 02 Fax: +31 (0)20 20

POpen - Wait For Process To Complete

2007-12-21 Thread McGirr, Mark A ILMB:EX
Rob. Did you ever figure this out. It's driving me crazy too. Mark McGirr Land Information Specialist Regional Client Services Division Integrated Land Management Bureau Ministry of Agriculture and Lands

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-14 Thread Mark Lawrence via Python-list
it.com/r/Python/comments/6z6wst/twisted_is_93_ported_to_python_3/ a little project called Twisted is 93% ported to Python 3. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email has been checked for viruses by AVG. htt

Re: Easy way to get a list of tuples.

2017-09-21 Thread Mark Lawrence via Python-list
6, 1600), ('THE SHORTS', 7, 1100), ('KINGTON TOWN STAKES', 8, 2000), ('BM 84 HANDICAP', 9, 1200)] I get close creating a list of elements but each attempt I try to create the list of tuples fails. This is my closest code data = r.json() raceData = [] for item in data["RaceDay"]['Meetings'][0]['Races']: raceDetails = item['RacingFormGuide']['Event']['Race'] raceData += (raceDetails['Name'],raceDetails['Number'],raceDetails['Distance']) print(raceDetails) which returns ['CLASS 3 HANDICAP', 1, 1000, 'BM 90 HANDICAP', 2, 1600, 'HERITAGE STAKES', 3, 1100, 'BILL RITCHIE HANDICAP', 4, 1400, 'TEA ROSE STAKES', 5, 1400, 'GEORGE MAIN STAKES', 6, 1600, 'THE SHORTS', 7, 1100, 'KINGTON TOWN STAKES', 8, 2000, 'BM 84 HANDICAP', 9, 1200] How do I get the tuples? Cheers Sayth --- This email has been checked for viruses by AVG. http://www.avg.com After a quick glance and hence completely untested:- raceData.append((raceDetails['Name'],raceDetails['Number'],raceDetails['Distance'])) -- 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: [Tutor] beginning to code

2017-09-22 Thread Mark Lawrence via Python-list
nistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email has been checked for viruses by AVG. http://www.avg.com -- https://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] beginning to code

2017-09-22 Thread Mark Lawrence via Python-list
n yet. The reference implementation is written in C but there's also Jython (Java) and IronPython (.Net). -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email has been checked for viruses by AVG. http://w

Re: [Tutor] beginning to code

2017-09-23 Thread Mark Lawrence via Python-list
On 23/09/2017 04:06, Bill wrote: Mark Lawrence wrote: On 22/09/2017 08:01, Bill wrote: Steve D'Aprano wrote: On Fri, 22 Sep 2017 02:57 pm, Bill wrote: I find Python to be more more like Java, with regard to "passing objects by reference". Which is not a surprise, since both

Re: Printing a Chunk Of Words

2017-09-28 Thread Mark Lawrence via Python-list
(and_, or_): for a, b in product(bools, repeat=2): ans = logic(a, b) print(f'{a} {l[logic]} {b} is {ans}') print() for b in bools: print(f'Not {b} is {not b}') -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do

Re: Python 2 -> 3, urllib.urlOpen

2017-10-14 Thread Mark Lawrence via Python-list
ion for) onto the computers in the school. Therefore, I'm looking for something in the Python 3.6 Standard Library. Thanks in advance, Irv Hopefully this https://docs.python.org/3/howto/pyporting.html will help. -- 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: f-string syntax deficiency?

2023-06-06 Thread Mark Bourne via Python-list
the `dest` argument to `add_argument()` which can specify a different name for the attribute used in code (it's almost like they thought about this type of problem ;o)). If it's from `optparse`, that has a similar argument, but `optparse` is deprecated so consider updating to `argparse`. (Recently there has been an effort to provide clearer and more useful error messages; this seems to be a case where there is still room for improvement: "SyntaxError: invalid syntax" doesn't immediately remind me of that fact that 'return' is a keyword and therefor can't be used as an attribute.) -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Attaching a mock function to another mock breaks reset_mock()

2023-06-19 Thread Mark Bourne via Python-list
re something I'm doing wrong here? Or does this seem like a bug in unittest.mock that I should report? Perhaps this is something that's not often done, so the issue hasn't been noticed before. Trying to search for information generally leads back to the unittest.mock documenta

Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-05 Thread Mark Summerfield via Python-list
For GUI programming I often use Python bindings for Qt. There are two competing bindings, PySide and PyQt. Ideally I like to have applications that can use either. This way, if I get a problem I can try with the other bindings: if I still get the problem, then it is probably me; but if I don't

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Mark Lawrence via Python-list
at our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
s :( What have I missed? Python 3.5.1 on Windows 10. -- 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: Instalação

2016-03-30 Thread Mark Lawrence via Python-list
creasingly rare. Grab 3.5.1 from here https://www.python.org/downloads/ -- 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: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 15:45, ast wrote: "Mark Lawrence" a écrit dans le message de news:[email protected]... I believe something like this should suffice to display borders around the radiobuttons. import tkinter as tk import tkinter.ttk as ttk root = tk.

Re: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
On 30/03/2016 15:55, ast wrote: "ast" a écrit dans le message de news:[email protected]... "Mark Lawrence" a écrit dans le message de news:[email protected]... I believe something like this should suffice to displa

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Mark Lawrence via Python-list
ndeed IMHO it's enumerate() that will be a confusing duplication. Please explain how a builtin that was brought in due to popular demand can be a "confusing duplication". -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mar

Re: Suggestion: make sequence and map interfaces more similar

2016-03-30 Thread Mark Lawrence via Python-list
quot;, no further comment needed. -- 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: Adding borders to ttk radiobuttons

2016-03-30 Thread Mark Lawrence via Python-list
ython-tkinter-discuss/3373/ ? -- 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: Python Array

2016-03-30 Thread Mark Lawrence via Python-list
nd', 'price': '295.00 as you can see the option element was added third but is the first one displayed. Is this just standard - I am using Python 3.5 Yes, as you are using a standard dict within the list. There is https://docs.python.org/3/library/collections.html#collections.OrderedDict which retains the insertion order. Regards Colin -- 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: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Mark Lawrence via Python-list
(). As this is a Python list the above definition clearly takes priority over your definition, so can you please take this discussion offline, thanks. -- 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: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Mark Lawrence via Python-list
On 31/03/2016 13:49, Marco Sulla via Python-list wrote: On 31 March 2016 at 14:30, Mark Lawrence via Python-list wrote: Note that dict also supports __getitem__() and __len__(), but is considered a mapping rather than a sequence because the lookups use arbitrary immutable keys rather than

Re: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Mark Lawrence via Python-list
r you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Suggestion: make sequence and map interfaces more similar

2016-03-31 Thread Mark Lawrence via Python-list
On 31/03/2016 14:27, Random832 wrote: On Thu, Mar 31, 2016, at 09:17, Mark Lawrence via Python-list wrote: On 31/03/2016 14:08, Antoon Pardon wrote: Op 31-03-16 om 13:57 schreef Chris Angelico: Okay. I'll put a slightly different position: Prove that your proposal is worth discussi

Re: Suggestion: make sequence and map interfaces more similar

2016-04-01 Thread Mark Lawrence via Python-list
On 01/04/2016 08:59, Antoon Pardon wrote: Op 31-03-16 om 16:12 schreef Mark Lawrence via Python-list: On 31/03/2016 14:27, Random832 wrote: So can we discuss how a unified method to get a set of all valid subscripts (and/or subscript-value pairs) on an object would be a useful thing to have

Re: Drowning in a teacup?

2016-04-01 Thread Mark Lawrence via Python-list
. I would suggest that you search the archives, but that would upset teacher, so I won't. -- 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: [beginner] What's wrong?

2016-04-01 Thread Mark Lawrence via Python-list
language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Strange range

2016-04-01 Thread Mark Lawrence via Python-list
ed to have Bots here commenting on the Python language. Obviously they've all given up as so much drivel is spouted, and/or they've gone to join the Norwegian Blue. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawren

Re: [beginner] What's wrong?

2016-04-01 Thread Mark Lawrence via Python-list
he problem, other than failure to RTFM? -- 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: Drowning in a teacup?

2016-04-02 Thread Mark Lawrence via Python-list
expect the sort would be slower than most of the other suggestions. My gut feeling about how fast something is in Python has never once been right in 15 years. There is only way way to find out, measure it with things like https://docs.python.org/3/library/profile.html and https://docs.python.org/3/library/timeit.html. IIRC Steven D'Aprano has a wrapper for the latter called Stopwatch. -- 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

tkinter Entry validation modes

2016-04-02 Thread Mark Lawrence via Python-list
rk, as I'm just venturing into the tkinter world. -- 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: [beginner] What's wrong?

2016-04-02 Thread Mark Lawrence via Python-list
-- 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: [Beginner] - Hanging in the code, can't figure out what's wrong

2016-04-02 Thread Mark Lawrence via Python-list
bout Python. OTOH there are loads of people here who do know Python, backwards, sideways and inside out. If you state precisely what you are trying to achieve then you will get the correct answer. -- 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: [Beginner] - Hanging in the code, can't figure out what's wrong

2016-04-02 Thread Mark Lawrence via Python-list
BartC is renowned for knowing nothing about Python by his own admittance, and would you please not top post on the list. -- 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: [beginner] What's wrong?

2016-04-02 Thread Mark Lawrence via Python-list
uad, let alone the starting lineup. Of course this is completely irrelevant on the Python programming main mailing list, but it appears that any old crap is acceptable in the year 2016. A Bot, a Bot, any kingdom for a Bot. -- My fellow Pythonistas, ask not what our language can do for you, ask wha

Re: [Beginner] - Hanging in the code, can't figure out what's wrong

2016-04-02 Thread Mark Lawrence via Python-list
h is the most efficient, I'll leave that to others to test. -- 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: [beginner] What's wrong?

2016-04-02 Thread Mark Lawrence via Python-list
hat would happen to the poor little darlings if they had to spend the entire match on the pitch? -- 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: Strange range

2016-04-04 Thread Mark Lawrence via Python-list
ch?cq=range would appear to be as good a starting point as any. -- 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: [beginner] What's wrong?

2016-04-04 Thread Mark Lawrence via Python-list
On 02/04/2016 23:49, Michael Torrie wrote: Mark, your messages are showing up to the list as being from "python," at least on my email. Any reason for this? Assuming that you're referring to me, frankly I haven't a clue. I read this list with Thunderbird on Windo

Re: Best Practices for Internal Package Structure

2016-04-04 Thread Mark Lawrence via Python-list
tas, 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

<    53   54   55   56   57   58   59   >