Re: Editor Ergonomics [was: Important features for editors]

2013-07-08 Thread Rhodri James
while emacs is bad on the second, its excellent on the third -- to the extend that you 'live inside emacs,' you dont need the mouse. You clearly never trained as a classical pianist :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a Program to Decompose a Number and Run a Function on that Decomposition

2013-07-18 Thread Rhodri James
something obvious? Are you using Python 2.x or 3.x? That print statement is valid 2.x, but "print" is a function in Python 3, so the parameter need parentheses around them. This would all involve a lot less guesswork if you cut and pasted both your code and the error traceback. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-29 Thread Rhodri James
having to keep flipping between them slows me down dramatically. Long lines have no effect on the speed of the program, but they can have serious effects on the speed of the programmer. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP8 79 char max

2013-07-29 Thread Rhodri James
On Tue, 30 Jul 2013 01:11:18 +0100, Joshua Landau wrote: On 30 July 2013 00:08, Rhodri James wrote: I'm working on some shonky C code at the moment that inconsistent indentation and very long lines. It is extremely annoying not to be able to put the original code, my "transl

Re: 2 + 2 = 5

2012-07-05 Thread Rhodri James
five.contents[five.contents[:].index(5)] = 4 print(2 + 2 == 5) # True (must be sufficiently large values of 2 there...) Heh. The author is apparently anonymous, I guess for good reason. Someone's been writing FORTRAN again :-) -- Rhodri James *-* Wildebeest Herder to the Masses --

Re: Parsing ISO date/time strings - where did the parser go?

2012-09-10 Thread Rhodri James
A short standard, then :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Obnoxious postings from Google Groups

2012-11-01 Thread Rhodri James
I have here a language that does exactly what I want without all that messy syntax nonsense. I call it "Research Assistant." -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: loops

2012-12-02 Thread Rhodri James
t;, "copyright", "credits" or "license" for more information. print(1,2,3) 1 2 3 Python 2.7.1+ (r271:86832, Sep 27 2012, 21:12:17) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more inf

Re: Working with classes

2012-12-03 Thread Rhodri James
t make any sense at all I'm just starting to learn this. The program makes perfectly good sense, it is your description that I don't understand. Please tell us what it is supposed to do, and what makes you think it doesn't do it. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: [Help] [Newbie] Require help migrating from Perl to Python 2.7 (namespaces)

2012-12-23 Thread Rhodri James
your code and leave us to guess? Sorry but I'm not bored enough to try. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart (Terminolgy): "Class"

2013-01-14 Thread Rhodri James
computer science. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: fputs

2012-06-05 Thread Rhodri James
files ...and stop trying to think in terms of PHP. While you can write PHP in any language (I know people who still write FORTRAN, whatever language they might be using), you'll find that getting into the right mindset for whatever language you are using works a lot better. -- Rhodri James *-*

Re: doing cross platform file work

2011-06-23 Thread Rhodri James
On Thu, 23 Jun 2011 08:13:18 +0100, Gurpreet Singh wrote: ...Cygwin spam. Twice. Please don't mail to both comp.lang.python and python-list. They are gatewayed to each other, so we see your messages twice, which makes us roughly half as likely to respond to them. -- Rhodri

Re: Community Involvement

2011-08-04 Thread Rhodri James
an be pretty hit-and-miss. The other thing that may affect this is that anything posted to SE is subject to the Creative Commons license. This may be an issue for academic purposes, I don't know. (It's certainly an issue when you come across J*ff!) -- Rhodri James *-* Wildebees

Re: List spam

2011-08-18 Thread Rhodri James
27;s some, sure -- usually for Bollywood actress pictures -- but not enough to make me worry about Opera's relatively poor newsgroup filtering facilities. If you're getting as much as you say, it's being injected on the mail side of the gateway somehow. -- Rhodri Jame

Re: Word Perfect integration

2011-08-18 Thread Rhodri James
lumns, etc) has so far been unequaled in anything else I have looked at. I take it you haven't looked at TeX, then? :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Defining class attributes + inheritance

2011-03-08 Thread Rhodri James
Class, self).__init__(new_thing) I get the error TypeError: __init__() takes exactly 1 argument (6 given) Please give us either the rest of the code or the rest of the traceback, or preferably both. Without one or the other we have little hope of guessing what you've typed. -- Rh

Re: Defining class attributes + inheritance

2011-03-08 Thread Rhodri James
__ you will have to provide them somehow. In this case, I think what you meant was something like this: class NewClass(BaseClass): def __init__(self, a, b, c, d, new): super(NewClass, self).__init__(a, b, c, d) self.new = new # etc -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: class error

2011-03-19 Thread Rhodri James
p://bugs.python.org/issue11604 It has to be said that the confusion is exacerbated by ignoring PEP-8 and using the same (CamelCase) name for the module and the class. That does provide a rich source of errors in cases like this. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://ma

Re: Regex in if statement.

2011-03-20 Thread Rhodri James
t of applying regexes to everything regardless of how appropriate they are. I certainly did! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Python problem

2011-03-28 Thread Rhodri James
t the list *as a whole* on commas. That doesn't work. You split strings, not lists. By the looks of it that line is something left over from a previous attempt. Just delete it, it's not doing anything useful for you. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: An unusual question...

2011-04-17 Thread Rhodri James
On Sun, 17 Apr 2011 17:17:02 +0100, wrote: I`ll give you a clue... id(some_object) is close enough but NOT that close. You do realise that what id() returns is implementation-dependent, don't you? In particular, what IronPython returns isn't an address. -- Rhodri James *-*

Re: An unusual question...

2011-04-18 Thread Rhodri James
eturns from one version to the next. Relying on implementation-defined behaviour like this is a good way of getting code to blow up in your face. You'll get much more reliable results by starting in a language that was actually intended for direct memory access, like C, and wrappin

Re: Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread Rhodri James
e/giga/Desktop/Guitar1.flv'), stdout=PIPE, stderr=PIPE) The manual gives you an example of using shlex to split a string into tokens if you'd rather do it that way. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Namespaces in functions vs classes

2011-04-19 Thread Rhodri James
tions for a month. $50 will supply enough articles to keep a small company understandable for over a year. With your generous help, we can beat this scourge! Ahem. Normal service will now be resumed. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: MIDI message sending and receiving, MID file manipulation

2011-04-25 Thread Rhodri James
e. The Python In Music wiki page (http://wiki.python.org/moin/PythonInMusic) has an entire section on MIDI packages. I've never used any of them, so I can't comment. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: use of index (beginner's question)

2011-04-28 Thread Rhodri James
;, 'horse', 'moose'], "list2": ['62327', '49123', '79115'] } n = 2 s2 = "list" + str(n) a = lists[s2][lists["list1"].index('horse')] Both of these can be made less ugly if the list you want to index into isn't one of the lists you might want to look up, but that's just a detail. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: obviscating python code for distribution

2011-05-16 Thread Rhodri James
l the debug information. By chance I'm having to do something closely related to this at work just at the moment; it's hard, but far from impossible. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner needs advice

2011-05-30 Thread Rhodri James
ut (redirected to a file) they will fail... maybe even if they have a dictionary ! Now this is an analogy fallacy, and an obvious one at that. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get values for skos/note, skos/notation and label in N-Triples

2017-09-05 Thread Rhodri James
tp://opendatacommunities.org/id/geography/administration/par/E04009817> <http://www.w3.org/2004/02/skos/core#notation> "E04009817" . Are there any hello world examples? Examples of what? You really must explain yourself clearly or we cannot help you. -- Rhodri James *-* Ky

Re: Run python module from console

2017-09-05 Thread Rhodri James
ussion, where Steve wrote: |there should be a standard solution, instead of having to |re-invent the wheel over and over again. Even when the wheel |is only two or three lines. The difference is that inventing this particular wheel is almost always a mistake. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: A question on modification of a list via a function invocation

2017-09-06 Thread Rhodri James
rough an array. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: A question on modification of a list via a function invocation

2017-09-06 Thread Rhodri James
ay nothing at all.« Ludwig Wittgenstein, Tractatus Logico-Philosophicus (5.5303) Irrelevant. We are talking about identity, not identicallity (to coin a word). Or in plainer English, asking if two things are the same thing is not the same as asking if two things are identical. -- Rh

Re: tictactoe script - commented - may have pedagogical value

2017-09-06 Thread Rhodri James
0428174214/http://www.geocities.com/flo_kreidler/tictactoe.html Presumably they stop taking you seriously at that point? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: A question on modification of a list via a function invocation

2017-09-08 Thread Rhodri James
finite number of digits (in base 10). Surely an infinitely large integer has an infinite number of digits? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: the core values of the Python "platform"

2017-09-14 Thread Rhodri James
iteralist interpretations, I would suggest that trying to make deductions based on the Zen is a waste of time. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about modules documentation

2017-09-15 Thread Rhodri James
ext sentence' is the operative piece. I think that if the bit about placement was moved to the end of the paragraph the whole thing would be more readable and I wouldn't have stumbled on it. If it had meant "the imported module's names" or indeed "the importe

Re: Even Older Man Yells At Whippersnappers

2017-09-19 Thread Rhodri James
tains. Therefore, for a profound understanding of Python, everyone should learn BASIC first, just like I did! Tsk. You should have learned (a fake simplified) assembler first, then you'd have an appreciation of what your processor actually did. :-) -- Rhodri James *-* Kynesim Lt

Re: Old Man Yells At Cloud

2017-09-19 Thread Rhodri James
n my first term at university. I think they now happen later in the first year; looking at the on-line syllabus, the first two terms of IA Maths are now full of things that used to be taught at A-level. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Even Older Man Yells At Whippersnappers

2017-09-19 Thread Rhodri James
On 19/09/17 16:59, Grant Edwards wrote: On 2017-09-19, Rhodri James wrote: On 19/09/17 16:00, Stefan Ram wrote: D'Arcy Cain writes: of course, I use calculators and computers but I still understand the theory behind what I am doing. I started out programming in BASIC. Today,

Re: Even Older Man Yells At Whippersnappers

2017-09-19 Thread Rhodri James
On 19/09/17 17:52, justin walters wrote: On Tue, Sep 19, 2017 at 9:12 AM, Rhodri James wrote: Eh, my school never 'ad an electronics class, nor a computer neither. Made programming a bit tricky; we 'ad to write programs on a form and send 'em off to next county. None of t

Re: Even Older Man Yells at Whippersnappers

2017-09-19 Thread Rhodri James
y the other day. People at worked asked how old I was. I replied: ((3**2)+math.sqrt(400))*2 Quite a few people somehow came up with 47. And these are technical people. You obviously look very spry for your age. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Old Man Yells At Cloud

2017-09-21 Thread Rhodri James
but it breaks every beginners tutorial.) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Old Man Yells At Cloud

2017-09-21 Thread Rhodri James
On 21/09/17 16:12, Steve D'Aprano wrote: On Thu, 21 Sep 2017 08:19 pm, Rhodri James wrote: (That's basically my gripe against print becoming a function in Python3. It makes a lot of sense as has already been pointed out, but it breaks every beginners tutorial.) Nobody made tha

Re: Old Man Yells At Cloud

2017-09-21 Thread Rhodri James
t was a non-starter; it was less effort to ignore Py3 entirely. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Rhodri James
to the object is stored in the variable. It really isn't. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-26 Thread Rhodri James
On 25/09/17 20:40, Marko Rauhamaa wrote: Rhodri James : On 25/09/17 15:26, Marko Rauhamaa wrote: That's not what I said. I said all expressions *evaluate to* pointers. This may well be true in particular implementations, but it is an implementation detail so Chris' point st

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-26 Thread Rhodri James
/ :-) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: style: single and multiple lines

2017-10-02 Thread Rhodri James
down into manageable chunks; something as simple as the odd blank line to "paragraph" your code can make that a lot easier. Experience also suggests a correlation between code that's hard to read and code that's rather crap. -- Rhodri James *-* Kynesim Ltd -- https://mai

Re: The "loop and a half"

2017-10-03 Thread Rhodri James
g. In a C-like language, one could write: while x = int( input( "Number (enter 0 to terminate)? " )) print( f'Square = { x**2 }' ) One could. One would richly deserve the compiler warnings one got as a result, but one could. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-04 Thread Rhodri James
/python-ideas/2013-June/021610.html -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: newb question about @property

2017-10-04 Thread Rhodri James
sn't programming, you are as flat out wrong as if you think Small Gods is just about a deity having to work on being believed in. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: newb question about @property

2017-10-04 Thread Rhodri James
;>> print(p) (3,4) >>> print(p.x) 3 >>> p.x = 7 >>> print(p) (7,4) >>> p.z = 2 Traceback (most recent call last): File "", line 1, in AttributeError: 'Point' object has no attribute 'z' I pretty much never bother to do thi

Re: The "loop and a half"

2017-10-06 Thread Rhodri James
e in a pipeline, and at worst makes it useless; tools that do that tend not to get used. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: callable values

2017-10-06 Thread Rhodri James
;ll continue to call them callables. That way I won't burst into giggles when I accidentally think of them as church dignitaries. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-10 Thread Rhodri James
al problems. That would go a long way to explaining why I tried and failed to learn C++ three times from Stroustrup's books. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: on = style

2017-10-10 Thread Rhodri James
ns is more tedious and gives you less visual advantage, so I don't bother. Somewhere in the middle is a tipping point. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Rhodri James
asn't more comprehensible when rendered as either C or Python (or the high-level language of your choice, I imagine). -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Rhodri James
most extreme example. That's only really one level more complex than declarations I use fairly regularly (I am an embedded system programmer most of the time). On the other hand, I never actually do declare things in that way: typedef is your friend, and makes your C code much easier to r

Re: Lies in education [was Re: The "loop and a half"]

2017-10-12 Thread Rhodri James
orld via a serial port was _painful_. Amen, brother. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: how to read in the newsreader

2017-10-16 Thread Rhodri James
On 16/10/17 16:07, Grant Edwards wrote: Ah yes. I solved problem that by writing a wrapper around slrn so that my .newsrc and .score files reside "in the could". ^ Now there's a typo someone should run with :-) -- Rhodri Ja

Re: I used list, def. why li += [100, 200] , and li = li + [100, 200] is different

2017-10-23 Thread Rhodri James
e name "li" and nothing refers to our new object [1,2,3,4,5,100,200] any more. Python will quietly delete it ("garbage collect") in the background. The key is that "+" on its own creates a new object, while "+=" alters the existing object. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Invoking return through a function?

2017-10-30 Thread Rhodri James
s. (I didn't have to tell my boss to up our rates for dealing with this code. It took several days to do the work anyway, which was punishment enough at our rates.) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Coding style in CPython implementation

2017-10-30 Thread Rhodri James
deserve everything that will be coming to you.) c) if (variable) { ... } in place of if (variable) { ... } ? I assume you mean "if (variable != NULL)" here. Again, it emphasises the type; variable will be a pointer. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Invoking return through a function?

2017-10-31 Thread Rhodri James
returning. The function that's doing the calling that gets its expectation of flow control broken has no clue, and that's my problem. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Report on non-breaking spaces in posts

2017-10-31 Thread Rhodri James
-to-news gateway. Does anyone in a position to know have any opinions? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Code Snippets

2017-11-02 Thread Rhodri James
and dirty) that ought to be rejected in any code that isn't completely ephemeral. And in my experience, most "throw-away" code isn't thrown away. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Packages Error - Unresolved

2017-11-02 Thread Rhodri James
this is also a newsgroup). Could you repeat them in the body of your message? If they include the exact error messages and any traceback, that would be a great help. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Rhodri James
over the years that would have been markedly less buggy and not much slower if it had been written sequentially. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Rhodri James
On 03/11/17 14:50, Chris Angelico wrote: On Fri, Nov 3, 2017 at 10:26 PM, Rhodri James wrote: On 02/11/17 20:24, Chris Angelico wrote: Thank you. I've had this argument with many people, smart people (like Steven), people who haven't grokked that all concurrency has costs - th

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Rhodri James
On 03/11/17 18:12, Israel Brewster wrote: On Nov 3, 2017, at 7:11 AM, Rhodri James wrote: People generally understand how to move data around, and the mistakes are usually pretty obvious when they happen. I think the existence of this thread indicates otherwise :-) This mistake was far

Re: Ideas about how software should behave

2017-11-09 Thread Rhodri James
en if my own opinion is still strongly held. But some people really do behave moronically on this list. I generally killfile them before the urge to insult gets too strong, but I do see Chris's point; leaving people with the idea that unacceptable behaviour is acceptable is a service to

Re: Python homework

2017-12-07 Thread Rhodri James
got 90% of the way there and shown his working, which is truly excellent, but what he needed was for someone to hint at how to search through the array, not to be handed a working example with no explanation. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Please tell me how to execute python file in Ubuntu by double

2017-12-14 Thread Rhodri James
at front, but I always felt that having names determine types was somehow mucky. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Answers to homework questions [WAS]: Re: Python homework

2017-12-14 Thread Rhodri James
expected to use. I see your point as a teacher, but after all this *is* a Python mailing list and not a python-homework-support mailing list. That implies you shouldn't have answered a homework assignment at all :-p -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Learning

2017-12-18 Thread Rhodri James
didn't get the job, sadly). -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Learning

2017-12-18 Thread Rhodri James
On 18/12/17 16:33, Marko Rauhamaa wrote: Rhodri James : I haven't often been involved in hiring, but the few times I have we had more applicants than it was feasible to interview. You don't have to interview them all. Once you encounter an excellent candidate, you can close the de

Re: Tkinter,show pictures from the list of files in catalog-problem

2017-12-19 Thread Rhodri James
/txvB4IBtlUrn3TuB0rtu/ Nope. Not following a link from someone I don't know (with all due respect) with a URL I don't immediately recognise. If you want help, post your code here, preferably trimmed down to the minimum you need to demonstrate the problem. -- Rhodri James *-* Kynesim Lt

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Rhodri James
rithm. So I probably should have said "If NN's can ...". No, you should have said "If NNs can..." without the grocer's apostrophe :-) (Well, it seems to be that sort of thread.) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-30 Thread Rhodri James
On 30/01/18 16:47, alister via Python-list wrote: The British TV show QI seemed to think this is actually part of the Dutch driving test although they have been known to make mistakes It has to be noted that the QI Elves did not do particularly well in Only Connect... -- Rhodri James

Re: "None" and "pass"

2018-02-06 Thread Rhodri James
l for that. A docstring with nothing underneath doesn't look like a stub - it looks like a failed edit or something. Having a placeholder shows that it's intentional. ChrisA indeed and pass was implemented for precisely this usage why even think about possible alternatives None sh

Re: Regex on a Dictionary

2018-02-13 Thread Rhodri James
so passing it in whole like that won't work. If you know that the name will always show up in the title field, you can pass just the title: x = MyRegex.findall(MyDict['/Title']) Otherwise you will have to loop through all the entries in the dictionary: for entry in MyDi

Re: Python 2 to 3 Conversion

2018-02-19 Thread Rhodri James
e in theory you are supposed to use libnl (in some suitable wrapping), but my experience with that is that it is badly documented and horrendously unreliable. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Are the critiques in "All the things I hate about Python" valid?

2018-02-20 Thread Rhodri James
ds not available in Mathematica, such as expr2bdd, is there really any domain of computation where Mathematica is inferior to Python? Not knowing much about Mathematica, all I can say is "almost certainly." -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: How to make Python run as fast (or faster) than Julia

2018-02-22 Thread Rhodri James
ng of the benchmarks Pythonic, but still food for thought. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: How to make Python run as fast (or faster) than Julia

2018-02-26 Thread Rhodri James
behaviour of signed arithmetic overflow undefined, so you have no portability guarantees there. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there are good DRY fix for this painful design pattern?

2018-02-26 Thread Rhodri James
vars = self.defaults.copy() vars.update(kwds) # Do the work with vars['bashful'] etc -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3, column names from array - numpy or pandas

2016-12-15 Thread Rhodri James
no defensive coding for blank lines or unexpected data in there, and if want to use the results later on you probably want to stash them in a dictionary, but that will do the job. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Screwing Up looping in Generator

2017-01-04 Thread Rhodri James
ctually is a generator (not, say, a list or tuple), then no it won't work. Once a generator is exhausted, it's exhausted. Besides, the nested for-loops over the same iterable is a dead giveaway that something is wrong. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Clickable hyperlinks

2017-01-05 Thread Rhodri James
l question since it's based on incorrect assumptions." Translating that to "No" is just as much a mistake as translating it to "Yes." -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Screwing Up looping in Generator

2017-01-06 Thread Rhodri James
file specifications as it yields them. It would be > helpful to see the code for rootobs, if you have it. Ahem. If Sayth is using the correct terminology and rootobs actually is a generator (not, say, a list or tuple), then no it won't work. Once a generator is exhausted, it's

Re: Clickable hyperlinks

2017-01-09 Thread Rhodri James
On 05/01/17 02:53, Deborah Swanson (Deborah Swanson) wrote: Rhodri James wrote, on January 05, 2017 3:53 AM On 05/01/17 04:52, Deborah Swanson wrote: My original question was in fact whether there was a way to make clickable hyperlinks in a console. I was persuaded after about 10 replies that

Re: Clickable hyperlinks

2017-01-09 Thread Rhodri James
rah's inability to communicate again. I think she meant to say that the console is dumb, not dead. In a very strict sense that's almost true, but since we've been using "console" interchangeably with "terminal emulator" throughout this discussion, it's hil

Re: Using namedtuples field names for column indices in a list of lists

2017-01-09 Thread Rhodri James
ithin the same date, it's just: records = sorted( sorted( set(records), key=operator.attrgetter("Description") ), key=operator.attrgetter("Date") ) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Find and append file path

2017-01-12 Thread Rhodri James
ts. Which attribute you want depends on exactly what you mean by "the latest folder according to the latest date". Then just use your favourite means to join the directory name you selected to the original path. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: update a list element using an element in another list

2017-01-31 Thread Rhodri James
n the same order and the same length, which is probably an unwise assumption, but it's what your code does: for entity, update_dict in zip(entities, update_dicts): entity.update(update_dict) range(len(something)) is usually a warning sign (code smell, if you prefer) that you aren't thi

Re: Python 3.6

2018-03-07 Thread Rhodri James
window on your OS or the IDLE program? What exactly do you mean by "the binary its [sic] running with"? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Console

2018-03-07 Thread Rhodri James
Once you have a console running, all you should need to do then is type "idle" at the prompt. That should open a window, which amongst other things will tell you the version of Python it is using. If that fails, try "idle -n" instead; it may not make any difference, but it&#x

Re: Reg python regexp

2018-03-21 Thread Rhodri James
ape the square brackets as you normally would for your shell, with backslashes I presume. Then you need to escape the backslashes so they aren't interpreted specially by Python, with more backslashes. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Pep8 for long pattern

2018-03-28 Thread Rhodri James
tting their code if I have to work on it. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   >