Marko Rauhamaa wrote:
Steven D'Aprano :
def Do_The_Thing():
def internal_subpart_start(): ...
def internal_subpart_middle(): ...
def internal_subpart_end(): ...
...
That really should be done more. C weaned us from the routine Pascal
mechanism, but there's no reason not to exploit
Rustom Mody wrote:
Come to think of it take an SQL DBMS browser.
Should we say: Horizontal scrolls are BAD; just reformat the table after
reaching 80 columns?
I would say, yes, horizontal scrolling *is* bad in a table --
probably even worse than it is for text or code.
The reason is that tabl
Steven D'Aprano wrote:
Even on a modern keyboard, out of the ten most common digraphs:
th he in er an re nd at on nt
only er/re use consecutive keys,
Also keep in mind that E and R being adjacent on the
keyboard does *not* mean they're adjacent in the type
basket -- they're actually separated
Ian Kelly wrote:
What happens when another
programmer reviews the code using a different font and finds that
there is only 3.5em worth of space? Do we descend into Calibri /
Verdana line-length edit wars?
That's easy, we just decree that all Python source
code is to be displayed in this font:
Ben Finney wrote:
I am still looking for a solution (a Python-specific one would be fine).
The only other way I can think of is to put the tty
into raw mode and do your own line editing and echoing.
You could wrap it all up in a file-like object for the
rest of the code to use.
--
Greg
--
ht
Rustom Mody wrote:
On Wednesday, April 20, 2016 at 6:33:33 AM UTC+5:30, Steven D'Aprano wrote:
Anyone who thinks that we're heading back to hieroglyphics simply isn't
paying attention.
Which are just text in the range 13000-1342F:
http://unicode.org/charts/PDF/U13000.pdf
Moreover, the Egyp
Steven D'Aprano wrote:
But seriously, where is that documented? I've read the man page for rm, and
it doesn't say anything about treatment of symlinks
The Linux man page seems to be a bit deficient on this.
The BSD version contains this sentence:
The rm utility removes symbolic links, not
Derek Klinge wrote:
Also, it seems to me if the goal is to use the smallest value of n to get a
particular level of accuracy, changing your guess of N by doubling seems to
have a high chance of overshoot.
If you want to find the exact n required, once you overshoot
you could use a binary search
Steven D'Aprano wrote:
(Possible a few very old operating systems on
supercomputers from the 1970s or 80s may have supported inserting... I seem
to recall that VMS may have allowed that... but don't quote me.)
I wouldn't be surprised if VMS provided some sort of indexed
random-access file struc
Cai Gengyang wrote:
adjective1 = raw_input("Enter an adjective: ")
NameError: name 'Adjective1' is not defined
Python is case-sensitive. You've spelled it "adjective1" in one
place and "Adjective1" in another. You need to be consistent.
--
Greg
--
https://mail.python.org/mailman/listinfo/pyt
MRAB wrote:
Is it worthy of being in the Zen of Python?
+1. Maybe something along the lines of:
Dunder methods are for defining, not calling.
Unless you're a dunderhead[1].
[1] Meant in the sense of an enthusiast, cf. gearhead.
--
Greg
--
https://mail.python.org/mailman/listinfo/pytho
Irmen de Jong :
if sys.stdout.isatty():
#use a pager to display help text
else:
#print all help text normally
I think nowadays it's an anti-pattern for programs to
do their own pagination. Very often the "terminal" is
a GUI application with its own facilities for scrolling
and se
Chris Angelico wrote:
I thought the twentieth zen would never be found?
Yes. This will have to be numbered the 21st zen
to maintain that invariant.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Christopher Reimer wrote:
str.islower(): "Return true if all cased characters [4] in the string
are lowercase and there is at least one cased character, false otherwise."
str.isupper(): "Return true if all cased characters [4] in the string
are uppercase and there is at least one cased charac
Jussi Piitulainen wrote:
Ceterum censeo, the only suggested use for .swapcase I've ever heard of
is encryption.
Yep, all the smart terrorists these days are using a
combination of swapcase and rot13. Totally bamboozles
the FBI.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico wrote:
https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript
This video seems to be broken. It stops about 1/3 of the way
through for me and says "No video with supported format and
MIME type found".
--
Greg
--
https://mail.python.org/mailman/listinfo/pytho
DFS wrote:
Maybe it worked because the last time the file was written to was in a
for loop, so I got lucky and the files weren't truncated? Don't know.
It "works" because CPython disposes of objects as soon
as they are not referenced anywhere. Other implementations
of Python (e.g. Jython, PyPy
Steven D'Aprano wrote:
Who is setting and enforcing this quota, and given that only about 1 in 20
Python programmers is a woman, do you think men are seriously missing out
on any opportunities?
Suppose there are 100 people wanting to ask questions, and
there is only time to answer 10 questions.
Stephen Hansen wrote:
On Fri, May 6, 2016, at 11:43 PM, Gregory Ewing wrote:
Whether you think this is a good strategy or not,
beliavsky is right that it's not "equal".
This is a pedantically and nonsensical definition of "equal", that
ignores the many, many reas
Stephen Hansen wrote:
The point is, you don't usually commit after an error happens. You
rollback.
He might want to commit the ones that *did* go in.
That's not necessarily wrong. It all depends on the
surrounding requirements and workflow.
--
Greg
--
https://mail.python.org/mailman/listinfo/p
Dirk Bächle wrote:
What happens now and then is, that users are unhappy with the way this
Taskmaster proceeds. One peculiar detail is, that our "default"
Taskmaster always deletes the old target file before re-building
it...and in special situations this may be seen as unwanted.
I'm not conv
Paul Rubin wrote:
You can't instantiate T by saying
x = T()
and expecting to get back some value that is (indeterminately) an int or
a string.
Unless it's Python 6000 running on a quantum computer...
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Is there some way you can get more stuff into a single
html page? For example, use inline css and image data
instead of delivering them as separate files.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Ned Batchelder wrote:
I'm not sure how
the test runner could determine that it was empty. I guess it could
introspect the test function to see if it had any real code in it,
Then people would just get clever at putting dummy code
in the test that fools the test runner but doesn't really
test a
Grant Edwards wrote:
Product spec explicitly states HTTPS only. I'm told that is not open
for discussion. The customer is a large, somewhat bureaucratic German
corporation, and they generally mean it when they say something is
non-negotiable.
They're probably being sensible. The way the Inter
Steven D'Aprano wrote:
I don't really understand why the system can't track the current top of the
stack and bottom of the heap, and if they're going to collide, halt the
process.
That effectively *is* what it does.
The reason it manifests as a segfault is because of the way it
goes about dete
Rustom Mody wrote:
Both the mess in catching numeric overflow as well as stackoverflow looks like
its C's fault.
I consider it as the fault of currently fashionable stock hardware
The sad thing about C is that it doesn't even help you
detect integer overflow in *software*.
Every machine I've
Chris Angelico wrote:
[1] Some people's names can't be represented in Unicode.
Like this fellow's, for instance:
https://www.youtube.com/watch?v=hNoS2BU6bbQ
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Herkermer Sherwood wrote:
But there is already a reserved keyword that would work great here.
"finally".
Unfortunately, it wouldn't follow the semantics of try/except/else/finally.
Is it better to follow the semantics used elsewhere in the language, or
have the language itself make sense semant
Pete Forman wrote:
However I am coming from scientific measurements where 1.0 is the stored
value for observations between 0.95 and 1.05.
You only know that because you're keeping some extra
information in your head about what the 1.0 stored in
your computer represents. It's not inherent in the
Pete Forman wrote:
Gregory Ewing writes:
Pete Forman wrote:
However I am coming from scientific measurements where 1.0 is the
stored value for observations between 0.95 and 1.05.
You only know that because you're keeping some extra information in
your head about what the 1.0 stor
Christopher Reimer wrote:
Nope. I meant 8-bit ASCII (0-255).
http://www.ascii-code.com
That page is talking about latin-1, which is just one of many
possible 8-bit extensions of ascii.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
And I thought that the Turing model was based on binary:
It's not based on any particular encoding. When you define a
Turing machine, you can pick any set of symbols you want for
your alphabet. The model doesn't specify how they're
represented.
--
Greg
--
https://mail.py
Alan Evangelista wrote:
if the interest is learning OOP concepts (and not OOP in Python), IMHO
Java is better.
The problem with this is that if you're not careful you'll
end up learning a lot of cruft that is irrelevant to Python.
There's no clear distinction in Java between things that
are es
jlada...@itu.edu wrote:
So, how can I take the byte sequence <0x01 0x02 0x03 0x04 0x05 0x06 \n> that
Serial.readline() returns to me,
Using readline() to read binary data doesn't sound like
a good idea -- what happens if one of the data bytes
happens to be 0x0a?
If you're going binary, it woul
Steven D'Aprano wrote:
http://linuxmafia.com/faq/Licensing_and_Law/public-domain.html
From that:
It might be ruled to create a global licence for unrestricted use. That
> licence might or might not then be adjudicated to be revocable by subsequent
> copyright owners (heirs, divorcing spouses
jlada...@itu.edu wrote:
One common data transmission error I've seen in other systems is
added/dropped bytes. I may add a CRC-8 error-checking byte in place of the
newline.
Also maybe add a start byte with a known value at the
beginning of each packet to help resynchronise if you
get out of ste
Nagy László Zsolt wrote:
I do not use diamond shapes in my hierarchy, I guess that does not
affect me. I may be wrong.
If there are no diamonds, there is no need to use super.
Explicit inherited method calls, done correctly, will
work fine.
The only downside is that if your inheritance hierarc
Ben Finney wrote:
With classes all inheriting ultimately from ‘object’ (as all Python 3
classes do, and as all current Python 2 classes should), mutliple
inheritance inevitably places your classes in a diamond inheritance
pattern.
That's usually harmless, though, because object provides
very li
Ian Kelly wrote:
It can't belong to a subclass; the MRI guarantees that. But it's not
necessarily a superclass either.
Er, yes, what I really meant to say was that it could
be a class that got introduced into the MRO as a result
of someone else subclassing your class.
So when you make a super
Steven D'Aprano wrote:
On Sat, 4 Jun 2016 11:06 am, Gregory Ewing wrote:
there is no need to use super.
Except then you are precluding others from integrating your classes into
their class hierarchies.
And if you *do* use super, you're precluding integrating them
into other h
Random832 wrote:
There *is* a variable called None
[getattr(__builtins__, 'None')] which holds a leash tied to that puppy
... But nothing's special about the object
itself, no more than any other object.
The only special-ish thing about it is that it's unique --
there will never be another one
Steven D'Aprano wrote:
The *name* "x" is an entity which is bound to (i.e. a reference to) the
object 99, in some specific namespace, at some specific time. The name
itself is an English word consisting of a single letter, "x".
This is one reason why the term "name" is not good subsitute
for th
Peter Pearson wrote:
c
b
a**(b**c) = a
Also, in mathematical texts it's usually written with
the c smaller than the b, and the b smaller than the
a, which helps to make the precedence clear. We
can't do that in Python, unforunately. Unless we allow
writing the
MRAB wrote:
In Pascal, "and" has the same precedence as "*" and "or" has the same
precedence as "+".
Which was annoying, because it gave them higher precedence
than the comparison operators, so instead of
a = b and c > d
you had to write
(a = b) and (c > d)
--
Greg
--
https://mail.py
Steven D'Aprano wrote:
Even if you were right that objects must exist at
a single well-defined location, that is strictly irrelevant. That's
implementation, not interface.
We're talking about mental models. Sure, you could come up
with some kind of Tardis-like mental model where objects
exist i
Steven D'Aprano wrote:
I never said that the string "x" is the same thing as the variable x.
Maybe you didn't, but some people insist we shouldn't use
the term "variable" when talking about python, but use
"name" instead. I was pointing out that those two words
don't have the same connotations
Steven D'Aprano wrote:
I think I'm on
fairly solid ground to say that a language that is just like C except that
it allocates variables in a hash table at runtime, using runtime lookups
for variable access, would not satisfy the C89 or C99 standards.
I wouldn't be so sure about that. Modern C s
Marko Rauhamaa wrote:
> [concerning leashed puppies]
Note: no boxes! However, there are strings attached. Now you can truly
*bind* objects to variables.
If you wanted to really bind them good and proper,
you'd use duct tape (or "duck tape" as some people
call it -- arguably more appropriate in
Random832 wrote:
Er, how would that make them not first class?
They wouldn't be as transparent as references in C++,
which you just assign to like any other variable.
That works because C++ makes a distinction between
initialisation and assignment. It's not so easy to
separate those in Python.
Robin Becker wrote:
"Python was conceived in the late 1980s[1] and its implementation was
started in December 1989[2] by Guido van Rossum at CWI in the Netherlands"
so that Aycocks's paper must have been at the -1st Python Conference
When the time machine was invented, Guido thought it would
Steven D'Aprano wrote:
I have a 2000 inch monitor, and by using a narrow proportional
font set to 5pt, I can display the entire Python standard library including
tests on screen at once. Then it's just a matter of using my trusty 4"
reflecting telescope to zoom in on any part of the screen I like
alanquei...@gmail.com wrote:
I see that in most cases the order doesn't matter, but still I would
think that since the correct order is from right to left, that should be the
common practice.
This order is only "correct" if overriding is what you want.
That's not always going to be the case. Th
Michael Torrie wrote:
On 06/12/2016 11:16 PM, Steven D'Aprano wrote:
Squirt it down a wire as bytes? Almost certainly.
Sometimes yes. But not always.
And even when the ultimate destination is a wire, a Python
programmer is more likely to be accessing the wire through
some high-level interf
Chris Angelico wrote:
Maybe what Python needs is an "ascii" type that's a subclass of both
str and bytes, and requires that the contents be <0x80. It is text, so
it can be combined with text strings; but it is also bytes, so when
you combine it with bytes strings, it'll behave as most people expe
Lawrence D’Oliveiro wrote:
I feel a new phrase coming on: “good enough for Bible work”!
I understand there's a passage in the Bible somewhere that
uses a 1 significant digit approximation to pi...
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Ian Kelly wrote:
Remember, the cubit was based on the length of the
forearm, so it's not like it was a terribly precise measurement to
begin with;
Let's not sell them short. Just because it was based on a forearm
doesn't mean they didn't have a precise standard for it, any more
than people who
Michael Vilain wrote:
BBEdit has been around a long time and for it's price ($130) it does a
lot but it's falling behind the times. New versions aren't really adding
much in terms of new features.
There's a free version of BBEdit called TextWrangler that's
pretty good. I'm currently using it f
Lawrence D’Oliveiro wrote:
But not vi/vim. It only lets you place your cursor *on* a character, not
*in-between* characters.
That's because the terminals it was designed to work on
didn't have any way of displaying a cursor between two
characters. Emacs is the same (except it doesn't go as
far
Marko Rauhamaa wrote:
And he made a molten sea, ten cubits from the one brim to the other:
it was round all about, and his height was five cubits: and a line of
thirty cubits did compass it round about. [1 Kings 7:23]
I think I know how that came about. It was actually filled
with molt
Marko Rauhamaa wrote:
The pile originally had -4 coconuts. The first sailor threw one to
the monkey, leaving -5 coconuts in the pile. He took his share (-1
coconut) out and put the remaining -4 coconuts back in the big pile.
Sounds a bit like Hawking radiation. A coconut-anticoconut
p
Steven D'Aprano wrote:
China has just announced a new supercomputer that is so fast it can run an
infinite loop in 3.7 seconds.
They're lying. It has to be NaN seconds.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Marko Rauhamaa wrote:
pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange):
Near a black hole 3.7 seconds can last an infinite time...
Which phenomenon prevents a black hole from ever forming. Yet
astronomers keep telling us they are all over the place.
Astronomers have observed objects
Marko Rauhamaa wrote:
pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange):
For a scientific point of view, right. But tell this to the one that
will be close to a blackhole ;-)
Then, you'd better consult a priest than a scientist.
But don't worry, you'll have an infinitely long time
to
Marko Rauhamaa wrote:
The singularity being talked about there is an artifact of a
particular coordinate system; the theory predicts that there is no
*physical* singularity at the event horizon.
That theory can't be tested even in principle, can it? Therefore, it is
not scientific.
It can in
BartC wrote:
On 26/06/2016 08:36, Lawrence D’Oliveiro wrote:
One of Python’s few mistakes was that it copied the C convention of
using “=” for assignment and “==” for equality comparison.
One of C's many mistakes. Unfortunately C has been very influential.
I'm not sure it's fair to call it
BartC wrote:
I did a year of it in the 1970s. Looks funny in lower case though.
It's interesting how our perceptions of such things change.
Up until my second year of university, my only experiences
of computing had all been in upper case. Then we got a
lecturer who wrote all his Pascal on the
Christopher Reimer wrote:
How can you not use chained assignments? I thought Python was the art of
the clever one-liners. :)
No, Python is the art of writing clever one-liners
using more than one line.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody wrote:
I said that for the Haskell list [0..]
[0..] ++ [-1] == [0..]
He said (in effect) yes that -1 would not be detectable but its still there!
The code to generate it is there, but it will never
be executed, so the compiler is entitled to optimise
it away. :-)
He may have a po
Marko Rauhamaa wrote:
We cannot get any information on black holes proper because black holes
cannot come into existence according to the very theory that predicts
black holes. It will take infinitely long for an event horizon to form.
Only in some frames of reference.
By your reasoning, Zeno'
BartC wrote:
You mean the rationale was based on saving keystrokes?
Maybe disk space as well -- bytes were expensive
in those days!
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
Or my favorite example of a parser headache: which is the loop
instruction and which is the assignment
DO10I=3,14
DO 10 I = 3.14
And if the programmer and/or compiler gets it wrong,
your spacecraft crashes into the planet.
--
Greg
--
https://ma
BartC wrote:
On 27/06/2016 23:45, Lawrence D’Oliveiro wrote:
FORMAT(...complex expression with lots of nested parentheses...) =
You just design the compiler to do the same processing in each case, ie.
parse a followed (), then mark the result AST
fragment as either an Array term, or Fo
Marko Rauhamaa wrote:
--
/ \
/ (almost) \ N
|black ||
| hole |S
\/
\ /
--
/
/ compass needle
/
The compass needle shows that the probe is "frozen" and won'
Marko Rauhamaa wrote:
By the time the event horizon hits Tim at the speed of light, Tim will
have received all of our Universe's signals at an ever accelerating
frequency and increasing power. He will have seen the End of the World
before leaving it.
I don't think that's right. From the point o
Steven D'Aprano wrote:
There's only so far I can go without support from the compiler.
It turns out one can go surprisingly far. Here's something I
cooked up that seems to meet almost all the requirements.
The only shortcoming I can think of is that a nestedmodule
inside another nestedmodule wo
I wrote:
The only shortcoming I can think of is that a nestedmodule
inside another nestedmodule won't be able to see the names
in the outer nestedmodule
Actually, that's not correct -- the version I posted before
actually crashes if you try to refer to a name in an outer
nestedmodule from an in
I seem to remember Guido stating once that a design principle of
the new formatting system was for the part after the colon to
be the same as what you would put in an equivalent %-format,
to make it easy for people to switch between them.
If that principle still stands, then this would seem to be
Ethan Furman wrote:
I will readily admit to not having a maths degree, and so of course to
me saying the integer 123 has a precision of 5, 10, or 99 digits seems
like hogwash to me.
Seems to me insisting that the number after the dot be
called "precision" in all cases is imposing a foolish
con
Gene Heskett wrote:
The theory of relativity says that the faster you
are going, the more massive you become.
It doesn't, really. The equations only seem to say that
if you insist on keeping the Newtonian definitions of
momentum and kinetic energy in the context of relativity,
which is a silly
Random832 wrote:
Well, your amp hours will be shittier with a lower voltage.
Define "shittier". An incandescent flashlight (which consumes less power
at lower voltage) will last longer, but won't be as bright. If it's
still acceptably bright, that's not worse.
I think the point is that the ce
BartC wrote:
On 24/07/2016 14:24, Chris Angelico wrote:
No, it's an example of how *mixing tabs and spaces* can go wrong. And
in fact will always go wrong unless you legislate the width of a tab.
That's easy to say. How do you actually ensure that they aren't mixed?
The software may not high
BartC wrote:
(They don't need to be elaborate to start being confusing. Take 'int
*a[]' and 'int (*a)[]'; one of these is an array of pointers, the other
a pointer to an array. Quite different! But which is which?
Where have you seen 'int (*a)[]' used? I don't think I've
ever seen any real-lif
BartC wrote:
(Yes everyone uses T*a (pointer to T) instead of T(*a)[] (pointer to
array of T), because, thanks to how C mixes up deferencing and indexing,
the former can be accessed as a[i] instead of (*a)[i].
But it's wrong, and leads to errors that the language can't detect. Such
as when a
BartC wrote:
But otherwise free-flowing English text is not a good comparison with a
programming language syntax.
I think Python is more like poetry.
--
roses are red
violets are blue
is this the end
of the poem
no-one can tell
because there is no
end marker
thus spake the bdfl
--
https://mail
Marko Rauhamaa wrote:
int a[3];
>
a
produces a pointer to the array's first element.
Yes, and that makes using true pointer-to-array types
in C really awkward. You're fighting against the way
the language was designed to be used.
If you use a language in an un-idiomatic way, you can't
Michael Torrie wrote:
Python would have been alright to teach "programming," but to
teach the actual theory of programming languages (lambda calculus, lists
as a foundation unit for all other data structures)
I wouldn't say that "lists as a foundation unit for all other
data structures" is (or
Chris Angelico wrote:
So do I need to be able to "call a function as if it
were a procedure", or is there a stark difference between the two
types of callable?
Well, Pascal makes a stark distinction between them -- it's
a compile-time error to call a procedure as though it were
a function or vi
Chris Angelico wrote:
I mean, "for i in 3.5" should start half way down the loop body, complete that
loop, and
then do three complete loops.
+1, this is the best idea for a "loop-and-a-half"
construct I've ever seen.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
In English,
we can talk about having a quick meal of fast food, but not a fast meal of
quick food.
If you interpret "quick" in its original sense of "alive"
then it's theoretically possible, although not practised
much in civilised society these days. Yoghurt might
qualif
Steven D'Aprano wrote:
It has always perplexed me that Lisp's prefix notation is held up as
the /sine qua non/ of elegance and power, while Forth is ignored if not
ridiculed.
The reason Lisp is easier to program in than Forth is not
because of prefix vs. postfix. It's because in Lisp a function
Ian Kelly wrote:
(not grammar, since "myself" is grammatically correct)
Not sure about that. "Myself" is a reflexive pronoun,
used when the subject and object of a verb are the same.
So "I did this research by myself" is correct. But if
Bob is involved, the subject and object are different,
so
MRAB wrote:
Later processors have a DAS instruction, which is used after BCD
subtraction.
The humble 6502 doesn't have DAA/DAS, but instead has a decimal mode flag.
The 68000 also had a Decimal Add instruction, but disappointingly
it only worked a byte at a time. I guess running COBOL at high
duncan smith wrote:
Hello,
Just checking to see if anyone has attacked this problem before
for cases where the population size is unfeasibly large.
The fastest way I know of is to create a list of cumulative
frequencies, then generate uniformly distributed numbers and
use a binary search
Avi Gross wrote:
The question that seems to come up too often about the python name is a
distraction. In particular, it is answered fairly prominently in many places
as just being a nonsensical name because a founder once liked a comedic
entity that chose an oddball name, so they did too.
That
Dennis Lee Bieber wrote:
Getting too close to REXX (which was something like Restructured
EXtended eXecutor).
And if we continue the theme of dinosaur evolution, we end up
with Tyrannosaurus REXX.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
DL Neil wrote:
(not that New Zealanders need to know much about snakes!)
Probably recommended when we visit Australia, though.
Also we seem to have imported some of their spiders in recent
years, so it's only a matter of time before their snakes
follow.
I wonder if we could get Australia to p
vergos.niko...@gmail.com wrote:
I just tried:
names = tuple( [s.encode('latin1').decode('utf8') for s in names] )
but i get
UnicodeEncodeError('latin-1', 'Άκης Τσιάμης', 0, 4, 'ordinal not in range(256)')
This suggests that the string you're getting from the database *has*
already been correc
vergos.niko...@gmail.com wrote:
[python] con = pymysql.connect( db = 'clientele', user = 'vergos', passwd =
'**', charset = 'utf8' ) cur = con.cursor() [/python]
From that i understand that the names being fetched from the db to pyhton
script are being fetced as utf8, right?
No, I don't th
Avi Gross wrote:
I can see why you may be wondering. You see the nan concept as having a
specific spelling using all lowercase and to an extent you are right.
No, he's talking about this particular line from the transcript you
posted:
>>>float(" nan")
> Nan
This suggests that the interpreter
601 - 700 of 1597 matches
Mail list logo