Re: automated pep8 reformatter ?

2011-04-13 Thread James Mills
d - I'm more interested in readability more than anything. I often use pyflakes in conjunction with pep8 to keep my own code clean, readable and consistent. Thanks for the suggestion! cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: automated pep8 reformatter ?

2011-04-13 Thread James Mills
ady exists that fits your tastes. I doubt such a tool could be written either. The vim plugin I referenced earlier works nicely enough. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Egos, heartlessness, and limitations

2011-04-13 Thread James Mills
week or month at least. Because he has better things to do ? LIke his job at Google ? cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Egos, heartlessness, and limitations

2011-04-13 Thread James Mills
different groups in the first place (python-dev, python-core-mentoring, python-ideas, etc) so that there is a clear separation of "what's what". Can we stop arguing about this now ? cheers James > http://mail.python.org/mailman/listinfo/python-list > -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-17 Thread James Mills
7;ve been over this! :) And you're a bit late... You said it yourself "If there is code after that snippet" cheers James -- -- James Mills -- -- "Problems are solved by method" -- 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: [Tutor] working with strings in python3

2011-04-18 Thread James Mills
ngs. Use a a format specifier like this: > message = "Bah." > > if test: >   message = "%s %s" (message, " Humbug!") > > print(message) Python3 (afaik) also introduced the .format(...) method on strings. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE bug

2011-04-18 Thread James Mills
On Tue, Apr 19, 2011 at 2:05 PM, harrismh777 wrote: > Are bug reports wanted here, or just in issue tracker? Pretty sure they're wanted in the Issue Tracker. cheers James -- -- James Mills -- -- "Problems are solved by method" -- 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

meteclasses 2.x/3.x compatibility

2011-04-19 Thread James Mills
Hi all, Is there a compatible way to use meteclasses in both Python 2.x (2.6 to 2.7) and Python 3.x (3.0 to 3.2). Python 2.x: class Foo(object): __meteclass__ = MyMetaClass Python 3.x: class Foo(metaclass=MyMetaClass): pass Thanks, cheers James -- -- James Mills -- -- "Problem

Re: [Tutor] NLP

2011-04-20 Thread James Thornton
http://scikit-learn.sourceforge.net/ On Fri, Apr 8, 2011 at 6:52 AM, Ranjith Kumar wrote: > Hi all, >     Can anyone suggest me any best Natural Language Processing in > python other than nltk. > -- > Cheers, > Ranjith Kumar K, > Chennai. > http://ranjithtenz.wordpress.com > > > > > _

Re: meteclasses 2.x/3.x compatibility

2011-04-20 Thread James Mills
ttp://code.google.com/p/lepl/source/browse/src/lepl/matchers/matcher.py#40 I > have > >  _Matcher = ABCMeta('_Matcher', (object, ), {}) > > and then > >  class Matcher(_Matcher): >      ... Thank Andrew. I like this approach Elegance wins for me :) cheers James --

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

2011-04-27 Thread Kelly James
Only an experienced person can tell about life in this great way. http://www.insurancesos.co.uk/articles/life-insurance/index.html"; rel="dofollow">Life Insurance UK -- 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: Composition instead of inheritance

2011-04-28 Thread James Mills
is typical of MixIns cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: importing class objects from a pickled file

2011-05-03 Thread James Mills
See: http://docs.python.org/library/pickle.html#the-pickle-protocol Any time you want to unpickle a user class, that class must be available. I suggest serializing to a more common format (say JSON) and re-create your class with the data. cheers James -- -- James Mills -- -- "Problem

Re: Running and killing a process in python

2011-05-03 Thread James Mills
which module is best suited to > do this? subprocess? Yes start with the subprocess module: http://docs.python.org/library/subprocess.html cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

[OT]: PiCloud - really cool!

2011-05-04 Thread James Mills
: a, b, = 1, 1 while n > 1: a, b = b, a + b n -= 1 return b #cloud.start_simulator() jobs = cloud.map(fib, range(100)) print [cloud.result(job) for job in jobs] Enjoy! :) cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://

Re: [OT]: PiCloud - really cool!

2011-05-04 Thread James Mills
I find the API provided to be quite simple robust and potentially very powerful - depending on your application. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: BeautifulSoup import error

2011-05-05 Thread James Mills
n Python 2.x and Python 3.x - notably: except Exception, e: # Python 2.x except Exception as e: # Python 3.x I might suggest you take a look at using lxml instead which ships with the standard library. [ ... ] cheers James -- -- James Mills -- -- "Problems are solved by method" -

Re: 回复: Re: BeautifulSoup import error

2011-05-05 Thread James Mills
On Fri, May 6, 2011 at 3:57 PM, Stefan Behnel wrote: > No. While this has been suggested, it will not become part of the stdlib in > the foreseeable future. It's readily available as a separate package on > PyPI, though. Opps I meant xml.etree :/ My bad! cheers James --

Re: checking if a list is empty

2011-05-06 Thread James Mills
On Fri, May 6, 2011 at 4:36 PM, Jabba Laci wrote: > If I want to check if a list is empty, which is the more pythonic way? [...] > (2) if not li: This is fine. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: if statement multiple or

2011-05-06 Thread James Mills
problem You will need to (naively) do this: if "a" not in line or "b" not in line or "c" not in line: print line cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: How to access elemenst in a list of lists?

2011-05-08 Thread James Mills
ot; " for x in range(5)] for y in range(5)] >>> from pprint import pprint >>> pprint(grid) [[' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' '], [' ', ' ', ' ', ' ', ' '], [&

Re: checking if a list is empty

2011-05-08 Thread James Mills
h the suggestion (even if it is "right"), perhaps keep that to yourself. if not my_list: is a perfectly valid and fine idiom to use in Python. If you prefer some other way, that's fine. Quite frankly I'm sick of seeing posts that argue for the sake of arguing. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
ain, using the exact same ISO's to install. Do I have a Python, OS, or package issue? Many thanks, James -- http://mail.python.org/mailman/listinfo/python-list

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
h_value.split('_', 1) ValueError: need more than 1 value to unpack # grep -i vsr * # Using the informational line you suggested I see that 'vsr' showing as the current each_value. The string 'vsr' does not exist in my data though. Where could this be coming from? Tha

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Thank you Steven, I will take your advice :) In this particular case though, I do not think a lack of underscore is the issue, at least as far as I can understand the issue. Please see my reply to Ethan. Thanks, James On Mon, May 9, 2011 at 2:43 PM, Steven D'Aprano wrote: > On Mon

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Hello Ian, It does indeed to seem that way. However the script works just fine on other machines, with the same input file. Thanks, James On Mon, May 9, 2011 at 2:41 PM, Ian Kelly wrote: > On Mon, May 9, 2011 at 12:10 PM, James Wright wrote: >> Hello, >> >> I have b

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: > James Wright wrote: >> >> Thank you Ethan, >> >> This is what I see now: >> >> # python render4.py >> current each_value is: vsr >> Traceback (most recent call last): >>  File "

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Hello Ethan, On Mon, May 9, 2011 at 4:04 PM, Ethan Furman wrote: > James Wright wrote: >> >> On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: >>> >>> Change your print line to: >>> >>>   print("D4[%s] = %s" % (report, each_value))

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Sorry Alex, and thank you. On Mon, May 9, 2011 at 4:02 PM, Alex Willmer wrote: > (Direct reply to me, reposted on Jame's behalf) > > > > Hi Alex, > > On Mon, May 9, 2011 at 3:21 PM, Alex Willmer > wrote: >> On May 9, 8:10 pm, James Wright wrote: >>&g

Re: Overuse of try/except/else?

2011-05-09 Thread James Mills
is a dynamic programming language) but errors should be handled and caught by the caller - not the callee. My 2c, others may have other points of view... cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: Python backup programs?

2011-05-10 Thread James Mills
> or not? Recently I wrote a simple backup system for a client using a mixture of Python and Bash using rsync, ssh and pptp. (Not packaged well enough to show source though) It works very well and does the job. cheers James -- -- James Mills -- -- "Problems are solved by method"

Re: Overuse of try/except/else?

2011-05-10 Thread James Mills
al stack trace Valid point :) However I was referring to real experience where I've seen code that "catches all any any exception" and simply logs it. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: NewBie Doubt in Python Thread Programming

2011-05-11 Thread James Mills
onyms. > 5. is there a way to find out if the thread is still active or dead? See: pydoc threading.Thread or help(threading.Thread) cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: obviscating python code for distribution

2011-05-15 Thread James Mills
te all parts you want to hide in C/C++/Cython and > distribute them as .so/.dll Or you could do what everyone else is doing and provide your "application" as a service in some manner. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: obviscating python code for distribution

2011-05-15 Thread James Mills
his, short of closed-source? As I mentioned before (which I don't think you quite got)... Write your "game" for the "web". Write is as a SaaS (Software as a Service) - even if it's free and open source. cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

Re: obviscating python code for distribution

2011-05-15 Thread James Mills
are not very accessible. Funny you should mention this "now" :) I happen to be blind myself. Yes I agree Flash is not very accessible (never has been). Web Standards web apps and such however are quite accessible! cheers James -- -- James Mills -- -- "Problems are solved by method&

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: Overuse of try/except/else?

2011-05-21 Thread James Mills
r calling it a LateFunction seems more "fitting" :) cheers James -- -- James Mills -- -- "Problems are solved by method" -- http://mail.python.org/mailman/listinfo/python-list

count strangeness

2011-05-21 Thread James Stroud
self.data = [] ... def doit(self, count=0): ... for c in self.data: ... count += c.doit(count) ... count += 1 ... print count ... return count ... py> c = C() py> c.data.extend([C() for i in xrange(10)]) py> c.doit() 1 2 4 8 16 32 64 128 256 512 1024 1024 WTF? James -- http://mail.python.org/mailman/listinfo/python-list

Re: count strangeness

2011-05-21 Thread James Stroud
Chris Rebert wrote: WTF? Assuming your question is "Why is 1024 there twice?", the answer is The question is "Why is 1024 there at all?" It should be 10. James -- http://mail.python.org/mailman/listinfo/python-list

Re: count strangeness

2011-05-21 Thread James Stroud
Peter Otten wrote: James Stroud wrote: WTF? Put the code into a file, run it -- and be enlightened ;) tal 72% python2.7 eraseme.py 1 2 4 8tal 73% cat eraseme.py #! /usr/bin/env python class C: def __init__(self): self.data = [] def doit(self, count=0): for c in self.data

Re: count strangeness

2011-05-21 Thread James Stroud
James Stroud wrote: Chris Rebert wrote: WTF? Assuming your question is "Why is 1024 there twice?", the answer is The question is "Why is 1024 there at all?" It should be 10. James I mean 11, not 10--but you get the point. James -- http://mail.python.org/mailman/listinfo/python-list

Re: count strangeness

2011-05-22 Thread James Stroud
Peter Otten wrote: James Stroud wrote: WTF? Put the code into a file, run it -- and be enlightened ;) Compare the follower to the last. tal 77% cat eraseme.py #! /usr/bin/env python class C: def __init__(self): self.data = [] def doit(self, count=[0]): for c in self.data

Re: count strangeness

2011-05-22 Thread James Stroud
Chris Rebert wrote: On Sat, May 21, 2011 at 11:32 PM, James Stroud wrote: Chris Rebert wrote: WTF? Assuming your question is "Why is 1024 there twice?", the answer is The question is "Why is 1024 there at all?" It should be 10. Ah. This is why it's better to be

NEED HELP- read file contents, while loop to accept user input, and enter to exit

2011-05-24 Thread Cathy James
dear mentor, I need help with my code: 1) my program won't display file contents upon opening 2) my program is not writing to file 3) my program is not closing when user presses enter- gow do I do this with a while loop? please see my attempt below and help: #1) open file and display current fil

Re: NEED HELP- read file contents, while loop to accept user

2011-05-24 Thread Cathy James
elopment? > (Octavian Rasnita) > 3. Re: Why did Quora choose Python for its development? > (Chris Angelico) > 4. NEED HELP- read file contents, while loop to accept user > input, andenter to exit (Cathy James) > 5. Re: NEED HELP- read file contents, whil

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

Python hoodie

2011-05-31 Thread Christopher James
Hi all! I LOVE Python, and want to spread the word by sporting this awesome sweater shown at: http://www.freewear.org/?page=show_item&id=FW0067 which I found by looking on the merchandise page of python.org. However, I live in the United States and before checking out I noticed that on top of the

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

<    1   2   3   4   5   6   7   8   9   10   >