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
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
on't think you can.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
*binary*
format, what constitutes an *exact* decimal may be a little surprising!
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
cdump.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
more detailed advice.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
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
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
. 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
, 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
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
icit is better than implicit?
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
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
*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
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
;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
y some considerable margin.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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:
enerators. They
are far too cussed for that :-)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 "
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
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
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
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
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
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
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
ents
as class variables.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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.
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
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
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
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
anomalous in comparison with other C data types.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
301 - 400 of 855 matches
Mail list logo