Re: How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread Rhodri James
ieve you do it in C as you would in Python: you call the Series class! pyseries = PyObject_CallObject((PyObject *)&series_type, NULL); -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: How to instantiate a custom Python class inside a C extension?

2020-04-01 Thread Rhodri James
On 01/04/2020 18:24, Musbur wrote: Am 01.04.2020 15:01 schrieb Rhodri James: I believe you do it in C as you would in Python: you call the Series class! pyseries = PyObject_CallObject((PyObject *)&series_type, NULL); Well, that dumps core just as everything else I tried. What does

Re: How To Change Package Representation on Shell?

2020-04-01 Thread Rhodri James
on't think you can. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: RFC: For Loop Invariants

2020-04-11 Thread Rhodri James
ou care enough, refactor it as a comprehension: count = sum(1 for a in chars if a in seek) It it's not so simple, neither the comprehension nor your proposal are going to be as readable as the twice nesting. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Floating point problem

2020-04-17 Thread Rhodri James
*binary* format, what constitutes an *exact* decimal may be a little surprising! -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: What variable type is returned from Open()?

2020-04-17 Thread Rhodri James
d useless bits of code to cast something to (uint8_t *) because I want to see the bytes and the IDE will not give up on trying to interpret them for me. And people wonder why I stick to gdb when at all possible :-) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: What variable type is returned from Open()?

2020-04-17 Thread Rhodri James
On 17/04/2020 22:27, dcwhat...@gmail.com wrote: On Friday, April 17, 2020 at 2:11:17 PM UTC-4, Rhodri James wrote: And people wonder why I stick to gdb when at all possible :-) Never worked with it. Is it a debugger for compiled code, i.e. it steps through the executable while displaying the

Re: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Rhodri James
1 0 1 0 1 01 0 OK I don't see any violation of quoting or parentheses matching. Still trying to figure out what this lambda does. Presumably it's something to do with recognising string prefixes? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: python Netcdf and ncdump

2020-04-30 Thread Rhodri James
cdump. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Installation Problem

2020-05-05 Thread Rhodri James
more detailed advice. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: why no camelCase in PEP 8?

2020-05-19 Thread Rhodri James
h the same difficulty really. I certainly don't find it "hard" to grep for _snake_case. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-23 Thread Rhodri James
nt of view of someone who writes more C code than Python, not having to remember a new set of habits for Python makes life a lot simpler. Chacun à son goût and all that. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: stderr writting before stdout

2020-05-25 Thread Rhodri James
On 24/05/2020 05:27, Souvik Dutta wrote: Is there any precedence or priority order by which sys.stderr.write() and sys.stdout.write() works. No. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-26 Thread Rhodri James
t; pathlib.PureWindowsPath('/').is_absolute() |False Thanks, that seems to suggest that there is an issue and that I should hence submit this as an issue. It is indeed most curious as to why this obviously absolute path is not recognised as such :-) -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-26 Thread Rhodri James
documentation says, "If a component is an absolute path, all previous components are thrown away and joining continues from the absolute path component." Since "\\" is an absolute path component, all the previous components are thrown away and you are left with just "\\". -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Rhodri James
ing on the filing system. Anything else is, as you have discovered, error-prone. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Rhodri James
ade without a significant number of complaints (as in I can't remember the last one, and I've been around here for a while -- it's too hot for me to want to go hunt in the archives :-). How are these unexpected extensionless files getting created? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread Rhodri James
t they expect). I'm faintly gobsmacked that anyone expects something like that to work. If you want a directory, create it. That's what os.mkdir (and the pathlib equivalent) is for. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: .dll problem

2020-05-29 Thread Rhodri James
oogle turns up when you search for "windows runtime missing" explains what's going on and points to this link. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Binary Sort on Python List __xor__

2020-06-01 Thread Rhodri James
ense whatsoever for lists like ["The", "quick", "brown", "fox"]. There's a decent purpose for a class implementing the features you want, but I honestly don't think the generic list class is it. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: Imports, Namespaces, Poisoning, Readability

2020-06-05 Thread Rhodri James
ore likely to change my own module to fit :-) - do you prefer PSL's importlib over Python's native import-s, for one of these (or any other) reason? Um, why would I? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Can't download Pygame and Pgzero

2020-06-05 Thread Rhodri James
. Which version of Windows are you using? What exactly did you do to install Pygame and Pgzero, in order, and what exactly went wrong. Please copy and paste any error messages, don't send screenshots because the mailing list will strip them off and we won't see them. -- Rhodri

Re: Python-list Digest, Vol 201, Issue 9

2020-06-09 Thread Rhodri James
en insert it into the __dict__ as 'from', although a custom serializer would probably be preferable from a design standpoint. Might it be simpler to use a dict from the start? You could have a dictionary key of "from" without any problems. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Pycharm offers only implementation of an abstract getter but not an abstract setter

2020-06-25 Thread Rhodri James
On 24/06/2020 22:46, zljubi...@gmail.com wrote: Why Pycharm didn't offer a setter as well as getter? This is a general Python mailing list. If you have specific questions/complaints about PyCharm, they are probably better addressed directly to the makers of PyCharm. -- Rhodri

Code of Conduct address "hold message"

2020-06-30 Thread Rhodri James
nature of Thank you for your email about "". We will deal with it as soon as we can." Plus the usual platitudes about valuing my input and appreciating my custom which don't necessarily apply here ;-/ Any chance of getting the message altered to something a bit more fr

Re: Code of Conduct address "hold message"

2020-06-30 Thread Rhodri James
On 30/06/2020 15:25, Rhodri James wrote: Having just had occasion to use the code of conduct link (conduct...@python.org), I got back the message:   Your mail to 'conduct...@python.org' with the subject       Is being held until the list moderator can review it for approval

Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Rhodri James
ons. I mention this merely to reinforce the idea that these things are still answers as well as hostages to fortune. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Rhodri James
or do not give a monkey's, should _any_ political opinion be in the repo? -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Rhodri James
at is true or think it's utter bollocks. I asked the question to get the Steering Council's opinion, not anyone else's. If you collectively really must rehash the arguments again, please have the decency to do so in a different thread. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/listinfo/python-list

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-03 Thread Rhodri James
On 03/07/2020 15:28, Jon Ribbens via Python-list wrote: On 2020-07-03, Rhodri James wrote: On 02/07/2020 23:46, Random832 wrote: On Thu, Jul 2, 2020, at 18:29, Michael Torrie wrote: Come again? I can see no other link in the verbage with the "relics of white supremacy" that she r

Re: New to python - Just a question

2020-07-03 Thread Rhodri James
Python, you can read a file one line at a time, so how to count the number of lines in a file should be pretty obvious. Figuring out how to do that for every *.cpp file in a directory will involve looking through the standard library, or getting a bash script to do it for you :-) -- Rhodri J

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-05 Thread Rhodri James
On 04/07/2020 16:38, Random832 wrote: On Fri, Jul 3, 2020, at 08:48, Rhodri James wrote: As I said in my preamble, it doesn't matter whether you believe that is true or think it's utter bollocks. I asked the question to get the Steering Council's opinion, not anyone

Re: An I connected here?

2020-07-17 Thread Rhodri James
t sufficiently intrigued to go find out about. I think there are fewer experts with time lurking around here (and I don't count myself as one of those, TBH). Recent controversies and the attempts to moderate them have probably upset quite a lot of people one way or another. -- Rhodri James

Re: An I connected here?

2020-07-17 Thread Rhodri James
On 17/07/2020 20:12, J. Pic wrote: And Hollidays ;) Nah, that's next week ;-) Le ven. 17 juil. 2020 à 21:03, Rhodri James a écrit : On 17/07/2020 19:33, Steve wrote: Sorry folks, I really messed that one up. I tried to doctor up a reply to get the address correct but failed to d

Re: Most discussion on comp.lang.python is about developing with Python

2013-11-13 Thread Rhodri James
oderated. God alone knows what Googlegroups thinks it's doing. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: PyMyth: Global variables are evil... WRONG!

2013-11-13 Thread Rhodri James
s are really module-level globals? Isn't this a strawman you've already disallowed? It sounds to me like you're complaining that Python is ahead of the curve here :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-09 Thread Rhodri James
igid typing with practically non-existent typing (something Modula-2 and C didn't do nearly as well); and so on and so forth. None of this is stuff your students need for their work, so I wouldn't waste time side-tracking them with it. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-09 Thread Rhodri James
On Mon, 09 Dec 2013 23:42:14 -, Roy Smith wrote: In article , "Rhodri James" wrote: Pascal and BCPL contrasted rigid typing with practically non-existent typing Wow, you actually used BCPL? I didn't realize the language ever had any real use. I had only ever hea

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-12 Thread Rhodri James
, ten languages, that's 50 years I think. Or do I rewrite my diary for next week, so I learn Smalltalk Monday morning, Ruby Monday afternoon, Julia Tuesday morning ... Welcome to Computer Science lectures :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.pytho

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-16 Thread Rhodri James
elopment took one look at it and exclaimed, "It's a hammer, all our problems must be nails!" And the rest is C++. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Re: Experiences/guidance on teaching Python as a first programming language

2013-12-18 Thread Rhodri James
icit is better than implicit? -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-18 Thread Rhodri James
but it's a painful process and it won't be pretty. It's far better to use a language as it is rather than as you want it to be. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-19 Thread Rhodri James
*stuff* between you and the machine. That's not to say it's the right language to be writing applications. +1 -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Postfix conditionals

2014-01-05 Thread Rhodri James
statement to properly comprehend what was going on and what the results would be for my sample data. It looks like a good idea, but I don't think it works that well in practice. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Postfix conditionals

2014-01-06 Thread Rhodri James
;t have any relevant Perl around any more. I think it had to do with losing the visual cue of indentation, and just having to think that little bit harder to notice that I wasn't dealing with purely linear code. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Rhodri James
y some considerable margin. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: "More About Unicode in Python 2 and 3"

2014-01-06 Thread Rhodri James
On Tue, 07 Jan 2014 01:35:54 -, Chris Angelico wrote: On Tue, Jan 7, 2014 at 12:26 PM, Rhodri James wrote: On Mon, 06 Jan 2014 21:17:06 -, Gene Heskett wrote: On Monday 06 January 2014 16:16:13 Terry Reedy did opine: On 1/6/2014 9:32 AM, Gene Heskett wrote: > And from

Re: Python solve problem with string operation

2014-01-16 Thread Rhodri James
plest way to do this is probably using groupby: from itertools import groupby input = "3443331123377" output = "".join(k for k, _ in groupby(s)) print output -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: How to write this as a list comprehension?

2014-01-19 Thread Rhodri James
ningful_name(then, name): _,mn,dy,_,_,_,wd,_,_ = localtime(then) return somefunc(mn, dy, wd, name) ... [meaningful_name(then, name) for (then, name) in mylist] I assume there's some good reason you didn't want somefunc() to do the localtime() itself? -- Rhodri James

Re: Help with some python homework...

2014-02-02 Thread Rhodri James
price. * So the book costs "price_per_book - (discount * price_per_book)" after applying the discount. * refactoring, that's "(1 - discount) * price_per_book." Ta da! -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Functions help

2014-02-23 Thread Rhodri James
ime you call it: for i in range(6): print(i*i) for day in ("Mon", "Tue", "Wed", "Thu", "Fri"): do_stuff_for_day(day) -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Functions help

2014-02-27 Thread Rhodri James
On Tue, 25 Feb 2014 02:18:43 -, Dennis Lee Bieber wrote: On Mon, 24 Feb 2014 01:01:15 -, "Rhodri James" declaimed the following: The function "range" returns the sequence of numbers 1, 2, 3, 4 and 5 [*], so this has the same effect as if you had typed:

Re: Reference

2014-03-04 Thread Rhodri James
enerators. They are far too cussed for that :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Reference

2014-03-04 Thread Rhodri James
o a single ARM instruction, or that splitting a loop into two to avoid a conditional test will let an DSP's optimiser double the speed of a section of code. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Balanced trees

2014-03-11 Thread Rhodri James
he extra coding time (longer now that I'm not in practise), but that's a separate matter. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Balanced trees

2014-03-19 Thread Rhodri James
that there's no 16-bit overflow causing something unexpected. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: CallBack function in C Libraries.

2014-03-20 Thread Rhodri James
to suggest since it isn't one of the usual problems, but you might find reading https://wiki.python.org/moin/GoogleGroupsPython helpful. It will certainly help with the double-spacing in your quote above. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.or

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-22 Thread Rhodri James
l in Python; you'll be as happy as the friend of mine I've finally persuaded to stop writing Fortran in Python, I promise! -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: python installation on windows

2014-03-23 Thread Rhodri James
in the Quick Installation Guide." The "Quick Installation Guide" page has instructions for editing the Apache config files. No mention of running ".\configure" -- why are you doing that? Try just editing the config files as the documentation suggests an

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-23 Thread Rhodri James
On Sun, 23 Mar 2014 02:46:28 -, Ian Kelly wrote: On Sat, Mar 22, 2014 at 6:32 PM, Rhodri James wrote: On Sat, 22 Mar 2014 05:26:26 -, Rustom Mody wrote: Well almost... Except that the 'loop' I am talking of is one of def loop(): return [yield (lambda: x) for x

Re: python installation on windows

2014-03-26 Thread Rhodri James
when it got to me, and I nearly didn't bother putting in the effort to make it readable. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Time we switched to unicode? (was Explanation of this Python language feature?)

2014-03-26 Thread Rhodri James
Powers of two and one less than powers of two I use a lot, so 65535 for example is a token. The more digits there are in the number, the harder it is for me to take in in a way that doesn't happen with letters. Even "forty" is better than "40" if you want me to reca

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-30 Thread Rhodri James
ns. Many of whom even know what a merkin is, and use the term anyway. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Code style query: multiple assignments in if/elif tree

2014-03-31 Thread Rhodri James
ignoring the trouble line-wrapping caused in your post) to take in with only a couple of eye movements along the line. That makes a really quite surprising difference to the comprehensibility of the whole thing. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org

Re: Explanation of this Python language feature? [x for x in x for x in x] (to flatten a nested list)

2014-03-31 Thread Rhodri James
python3. right? No. Python 2.2 introduced Unicode. I didn't ask when it was introduced, I asked when it became useful? No you didn't. You even quoted yourself as not saying it, just in case you weren't clear about that. And since you're so experienced, you should recogn

Re: OFF TOPIC Spanish in the USA [was Re: Explanation of this Python language feature?]

2014-03-31 Thread Rhodri James
half the states feel the need to specify an official language. One might wonder why... -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Unpacking U-Boot image file

2014-04-10 Thread Rhodri James
Image Timestamp" I suspect taking this apart may be a little involved. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Teaching python to non-programmers

2014-04-10 Thread Rhodri James
post less likely to be read. Sorry your post was the straw to break the camel's back this week, but it is a complete pain to the rest of us. I have more than once considered getting my reader to automatically discard anything with "@googlegroups.com" in the message ID

Re: Teaching python to non-programmers

2014-04-13 Thread Rhodri James
On Fri, 11 Apr 2014 21:20:05 +0100, wrote: On Thursday, April 10, 2014 3:40:22 PM UTC-7, Rhodri James wrote: It's called irony, and unfortunately Mark is reacting to an all-to-common situation that GoogleGroups foists on unsuspecting posters like yourself. People who say "

Re: Can't figure out 'instance has no attribute' error

2014-05-17 Thread Rhodri James
and replace all your tab characters with four spaces, and stop using tabs. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem in writing demands to the xml file

2014-05-19 Thread Rhodri James
u say, "It doesn't seem to work," what do you mean? What are you expecting it to do? What does it actually do? Is there a traceback? -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Python box (home-use smart router)

2014-05-28 Thread Rhodri James
se Python for application writing because speed and space constraints are usually quite tight, which generally means coding in C for preference (despite my boss's attempts to force me to use C++). -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE for python

2014-05-28 Thread Rhodri James
lution screens is that he can tile more 80x40 console windows on them. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE for python

2014-05-31 Thread Rhodri James
rep, lgrep, grep-find etc I generally find "M-x grep" sufficient. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Editing tabular data [was: PEP8 79 char max]

2013-07-31 Thread Rhodri James
t would be more foolproof to edit that stuff with a spreadsheet. There's nothing foolproof about using a spreadsheet! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question

2013-08-06 Thread Rhodri James
k if goagain appears in a list (or rather a tuple) of strings: if goagain in ('y', 'yes'): print('ok') elif goagain not in ('y', 'yes'): print('goodbye') sys.exit() or better, if goagain in ('y', 'yes', 'ohdeargodyes', 'you get the idea'): print('ok') else: print('goodbye') sys.exit() -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Enum vs OrderedEnum

2013-08-06 Thread Rhodri James
ents as class variables. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Pair of filenos read/write each other?

2013-08-13 Thread Rhodri James
bit on what you're trying to do, exactly. If you give us a bit more context, we might be able to give you better advice. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Encapsulation unpythonic?

2013-09-02 Thread Rhodri James
s to "constants" persisted. Many's the poor natural scientist who was perplexed to find that 0 suddenly had the value 1! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: creating rectangle with qt-designer

2013-09-19 Thread Rhodri James
t Designer manual? Which can be googled for trivially, by the way. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Python variables? [was Re: class implementation]

2013-09-30 Thread Rhodri James
e accurate to say that Python has no constants! :) Or, alternatively, that Python has many constants, such as all those immutable integers cached around the place :-) What it doesn't have is fixed bindings. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: class implementation

2013-10-08 Thread Rhodri James
t makes it so much easier for the rest of us to understand what you meant when you use terms so loosely! -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-15 Thread Rhodri James
ly ludicrous statement (and grammatically suspect to boot) that does nothing to bolster my confidence in your philosophising. -- Rhodri James *-* Wildebeest Herder to the Masses -- https://mail.python.org/mailman/listinfo/python-list

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-10-25 Thread Rhodri James
r Usenet newsgroup. Google groups seems to delight in making the "previous" post a poorly defined concept (by gratuitously breaking reference chains and the like). It's not that the skill isn't universal, it's that the opportunity isn't. -- Rhodri

Re: Parsing multiple lines from text file using regex

2013-10-27 Thread Rhodri James
get delimiter collecting_banner = True banner_lines = [] elif found other stuff: do other stuff elif found delimiter: collecting_banner = False else: banner_lines.append(line) -- Rhodri James *-* Wildebeest Herder to

Re: Create an index from a webpage [RANT, DNFTT]

2011-09-08 Thread Rhodri James
map Generator (http://www.smart-it-consulting.com/article.htm?node=166&page=128, fourth offering when you google "map a website with Python") looks like a promising start. At least it produces something in XML -- filtering that and turning it into HTML should be fairly straight

Re: optionparse: how to add a line break to the help text

2011-09-10 Thread Rhodri James
fsdf\nsdfsdf s\n\n' Unfortunately the help text is formatted using textwrap, which presumes that the entire text is a single paragraph. To get paragraphs in the help text, you'll need to write an IndentedHelpFormatter subclass that splits the text on "\n\n", textwraps the

Re: How do I automate the removal of all non-ascii characters from my code?

2011-09-12 Thread Rhodri James
ng a character as a smart quote or a non breaking space or an e-umlaut or whatever, but that doesn't make the character legal! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: stackoverflow and c.l.py

2011-09-14 Thread Rhodri James
On Wed, 14 Sep 2011 14:05:23 +0100, memilanuk wrote: Rick & Xang Li are two examples of what you *don't* see (or at least I don't) @ SO Then you haven't been looking hard enough ;-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any way to access attributes from an imported module?

2011-10-02 Thread Rhodri James
. Do you mean that one of the imported modules wishes to use an instance created in the main script? If that's the case, you're going to have to pass the instance to the module somehow, since the module knows nothing of what if anything has imported it. -- Rhodri James *-* Wildebeest Her

Re: Is there any way to access attributes from an imported module?

2011-10-03 Thread Rhodri James
doesn't grievously abuse at least one of the terms you are using. Could you post some illustrative code snippets, please? -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Language Enhancement Idea to help with multi-processing (your opinions please)

2011-10-13 Thread Rhodri James
u want more than one statement executed per step was to wrap sequences of statements in a SEQ construct. You end up indenting a long way very fast if you aren't careful. I'm afraid much as I love PAR, Python's dynamicism makes it rather more 'exciting' than it was in occam.

Re: Understanding Boolean Expressions

2013-04-16 Thread Rhodri James
nals back you go further through precedence chain: comparisons, then bitwise operators (*not* bitwise comparisons!), then shifts, then arithmetic operators, the unary operators, the power operator, and finally primaries. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Scan CSV file and saving it into an array

2013-04-24 Thread Rhodri James
this less tedious to write. Odd that this subject should have come up so many times in various guises in the last week or two. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Rhodri James
good luck. I will look forward to continuing to see weekly questions on this list. :-) It would help if you were using "=" on things that were conceptually the same across the languages, instead of things that only looked similar. Which is where the data model comes in, as has alre

Re: Detecting open files and forcing closure

2009-01-09 Thread Rhodri James
lement a backup strategy. If you are, I'd suggest your problem is XCOPY -- you really need something more combat capable instead. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-10 Thread Rhodri James
anomalous in comparison with other C data types. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-13 Thread Rhodri James
t to the obviousness of the "leading underscore => private" convention, and I just don't see a burning need for it, that's all. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of "Readability counts"?

2009-01-14 Thread Rhodri James
many times). We return you to your regularly scheduled original point... -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: problem calling method

2009-01-14 Thread Rhodri James
t oversimplifying it? It would make it a lot easier to see what's going on. 3. There is no point 3. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   >