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
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
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
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
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
--
A short standard, then :-)
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
computer science.
--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
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 *-*
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
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
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
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
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
__
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
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
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
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
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 *-*
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
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
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
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
;, '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
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
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
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
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
rough an array.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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,
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
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
but it breaks
every beginners tutorial.)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
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
to the object is stored in the variable.
It really isn't.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
/
:-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
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
/python-ideas/2013-June/021610.html
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
;>> 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
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
;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
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
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
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
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
orld via a serial
port was _painful_.
Amen, brother.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
-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
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
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
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
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
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
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
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
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
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
didn't get the job, sadly).
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
/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
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
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
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
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
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
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
ng
of the benchmarks Pythonic, but still food for thought.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
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
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
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
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
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
tting
their code if I have to work on it.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
1 - 100 of 855 matches
Mail list logo