discovered because of a programming error.
https://en.wikipedia.org/wiki/Stuxnet
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ort will be very
fast, once a module is imported once the second and subsequent times is
very quick.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
th(sub or pred or obj)
# Parenthesised shortcut.
def add(self, (sub, pred, obj)):
do_stuff_with(sub or pred or obj)
Both methods take a single argument, which must be a sequence of exactly
three values. The second version saves a single line, hence the first
version is longer :-)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
built-in modules that don't live in the
file system, and probably more).
Is this problem already solved? Can anyone make any suggestions?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
're
deleting from the end, not the start. But even better, and this applies
to anything not just lists, is not to delete at all, but to create a new
list, copying the columns you want, rather than deleting the columns you
don't want.
I'm not familiar with pandas and am not sure about the exact syntax
needed, but something like:
new_df = [] # Assuming df is a list.
for col in df:
if col.value in keep_col:
new_df.append(col)
> if f[-3:] == 'csv' and f[-6:-4] in ('93', '94', '95', '96', '97', '98',
> '99', '00', '91', '02', '03', '04', '05'):
Where does f come from? You haven't shown the definition of that.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
x27;MED5']].isin([drugs[n]]).any(1)
>>
>>
> I was wrong, this is fast, it was selecting the columns that was slow.
> using
> keep_col = ['PATCODE', 'PATWT', 'VDAYR', 'VMONTH', 'MED1', 'MED2',
> 'MED3
On Wed, 30 Jul 2014 21:22:18 +0800, Leo Jay wrote:
> On Wed, Jul 30, 2014 at 3:43 PM, Steven D'Aprano
> wrote:
>> I'm looking for a programmatic way to get a list of all Python modules
>> and packages. Not just those already imported, but all those which
>> *
> hash(n) == hash(Fraction(n)) == hash(Decimal(n))
True
With the possible exception of Decimal, which is not fully integrated
with the numeric tower, all numbers in the standard library will obey the
condition that if x == y, hash(x) == hash(y), regardless of type.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ailable with yum and write the rest yourself.
+0.8 on that. Sometimes I install software outside of the package management
system, but I always feel a tad dirty when I do so :-)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
oes away.
*wink*
But seriously: if you need to ask "why not use eval?", you're not ready
to use eval safely. But in a nutshell:
- using eval is a large performance hit (about 10 times slower);
- eval is dangerous and can introduce code injection vulnerabilities.
eval is almost never the right solution to any problem, and in the very
few exceptions, it needs careful handling by an expert to ensure you're
not introducing serious security bugs.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 01 Aug 2014 14:17:41 +1000, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> On Thu, 31 Jul 2014 20:12:12 -0700, Dan Stromberg wrote:
>>
>> > I removed some quotes, and noticed that 1 and 1.0 hash the same.
>> > That's a bit
On Fri, 01 Aug 2014 09:32:36 -0400, Roy Smith wrote:
> In article <[email protected]>,
> Steven D'Aprano wrote:
>
>> eval is almost never the right solution to any problem, and in the very
>> few exceptions, it needs careful
of anyone here who is an expert in pandas, so if you ask
questions which are specific to pandas, we may run into the limits of our
knowledge. If you can find a dedicated pandas mailing list or other
forum, they may help too, but I don't know if they will be more or less
willing to explain the basics about Python.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 01 Aug 2014 14:39:09 +0100, Robert Kern wrote:
> Take a look at what has already been implemented in IPython:
>
> https://github.com/ipython/ipython/blob/master/IPython/core/
completerlib.py#L208
Awesome! Thank you!
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 01 Aug 2014 16:50:51 +0100, Mark Lawrence wrote:
>> which can be simplified to:
>>
>> flag = any( cond[c] == 1 and cond[c.upper()] for c in ['a', 'b', 'c'] )
>>
>>
> Shouldn't that be cond[c.upper()] == 0 ?
Yes it sh
our first
collision.
- It relies on the checksum being unpredictable, to prevent substitution
attacks: you're expecting object x with checksum a, but somebody
substitutes object y with checksum a instead.
Python's hash() function is not cryptographically strong and makes no claim
to be.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
"((df[{}] == 1) | (df[{}] == 0))".format(c, c.upper()) for c in df
> is c.islower())
> result = eval(expr)
I really don't believe that there is any benefit to that in readability,
power, flexibility, or performance. Also, you're using bitwise operators
instead of shortcut bool operators. Any reason why?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
re are two intended uses for object and its instances:
- as the base class for all other classes;
- instances can be used as featureless sentinel objects where
only identity matters.
If you need instances which carry state, then object is the wrong class.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
re with sufficient
effort we could do so, but that's a lot of effort for negligible (or even
negative) gain.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
like learning a new language. It's more like
the difference between American and British English.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
be
class-based. Also, the first OOP languages (Simula and, especially,
Smalltalk) are class-based, and people tend to copy what's been done before
and what they're familiar with.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
allible. Suppose you're expecting an
Artist, and call the artist.draw() method, but somebody gives you a
Gunfighter instead. There's also the problem of what to do when an object
provides only *part* of an interface: sometimes, by the time you have to
ask forgiveness, you've al
odeSkultor. datetime is a standard Python library, if
CodeSkulptor doesn't provide it, that's a serious bug.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
nt "exit"
> sys.exit()
That's all dead code. I hope it isn't important.
> except Exception, e:
> print e
> print "pycolFac1 - error!! \n";
Does that get printed?
> name=subprocess.Popen('uuidgen -t', shell=True,stdout=subprocess.PIPE)
> name=name.communicate()[0].strip()
> name=name.replace("-","_")
> name2="/home/ihubuser/parseErrTest/pp_"+name+".dat"
> ofile1=open(name2,"w+")
> ofile1.write(e)
> ofile1.write(aaa)
> ofile1.close()
> sys.exit()
That's awfully ambitious code for an except clause that you're not even
sure is working. Simplify, simplify, simplify.
except Exception, e:
with open("/tmp/myerror.txt", "w") as f:
f.write("%r" % e)
sys.exit(102)
Now you should be able to see the error written to the file, which you
should have write privileges to unless you're doing something very
unusual.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Seymore4Head wrote:
> On Sun, 03 Aug 2014 22:08:21 -0400, Seymore4Head
> wrote:
>
>>On Mon, 4 Aug 2014 11:43:48 +1000, Chris Angelico
>>wrote:
>>
>>>On Mon, Aug 4, 2014 at 11:29 AM, Steven D'Aprano
>>> wrote:
>>>>> Putting tha
;char format requires a bytes object of
> length 1":
> s = '1'
> p = struct.pack('c', s)
Here you use a Unicode string of length 1, '1'.
Do this instead:
s = b'1'
p = struct.pack('c', s)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
maybe*,
barely acceptable as a quick-and-dirty convenience at the interactive
interpreter, in a Bunch or Bag class that has very little in the way of
methods or behaviour, but not acceptable for a class as fundamental and
important as dict. No matter what Javascript thinks.
Consider:
d
y mydict$key, but the proliferation
of "many ways to do it" (to paraphrase the Perl motto) has costs of its
own. It's harder to learn, read and understand Perl code than Python code,
simply because there's more syntax to learn, and more special cases to
understand.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote:
> Steven D'Aprano wrote:
[...]
>> My refactoring, with the bare minimum use of exec necessary:
>>
>> https://code.activestate.com/recipes/578918-yet-another-namedtuple/
>
>
> This may be a silly question, but what would stop you moving th
Duncan Booth wrote:
> Steven D'Aprano wrote:
>
>> Unfortunately, software development on Windows is something of a
>> ghetto, compared to the wide range of free tools available for Linux.
I remember writing this. But I don't remember when it was. Presumably some
nction(obj):
if inspect.getargspec(obj) == (['self'], None, None, ()):
setattr(cls, name, property(obj))
return cls
@make_zero_arg_methods_into_properties
class Spam:
def eggs(self):
...
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 06 Aug 2014 12:07:58 +1000, Chris Angelico wrote:
> On Wed, Aug 6, 2014 at 10:49 AM, Steven D'Aprano
> wrote:
>> A
>> plethora of argument-less methods is a code smell -- that doesn't mean
>> it's *necessarily* a bad idea, but the class design reall
for as long as needed;
- or do without bug fixes and security updates.
If you want bug fixes, security updates AND feature enhancements, for free,
you have have to migrate to Python 3 (or another language). If you're
unhappy with that, write to Oprah, I'm sure she'll listen.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ble to (potentially) slow
down the common case of local file systems by a tiny amount, in order to
protect against the (rare) case where it will give a big speed things up?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
uot;
I daresay that Linus Torvalds spends more time in front of a computer screen
than most 9 to 5 "screenworkers".
By the way, you keep replying to people, and quoting them, but deleting
their name. Please leave the attribution in place, so we know who you are
replying to.
--
Steven
we normally
shouldn't need to, if you give as the details you already have. And of
course just because it "doesn't work" on your system, doesn't mean it won't
work on ours.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
2.x users can be as
> confident that Python 2.x will be supported on future operating systems.
Oh well, life wasn't meant to be easy. Fortunately they can run it under
Windows 98 or Centos 3.5 in a virtual machine.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
back and asking for another guess.
You don't check the counter until after the loop has finished. It needs to
be inside the loop, not outside:
while looping:
# See the indent?
# this is inside the loop
# No indent.
# This is outside the loop.
Also, having reached the count of
fork()
except NotImplementedError:
is_implemented = False
else:
if pid == 0:
# In the child process.
os._exit(0) # Unconditionally exit, right now, no excuses.
is_implemented = True
which is not obvious, simple or cheap.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Rustom Mody wrote:
> On Thursday, August 7, 2014 10:26:56 PM UTC+5:30, Steven D'Aprano wrote:
>> Roy Smith wrote:
>
>> > Peter Otten wrote:
>> >> os.fork()
>> >> Fork a child process.
>> >> ...
>> >> Availability: Un
his out of
the box, but I expect that there's probably a way to do it in a platform
specific way on each platform you wish to support. Either that, or the OP
can google for (including the quotes) and see
what comes up. I'd do so myself, except some damn fool Javascript code
running on some rubbish web site just crashed my browser. Again.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ng for exactly the same purposes
> each time
So, there's nothing wrong with it, except for the five things you list which
are wrong with it :-)
Seriously, if you're going to compete with the Stackoverflow ad hoc
solutions, you have to be more assertive that there is a problem with the
ad hoc solutions.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico wrote:
> On Fri, Aug 8, 2014 at 11:58 PM, Steven D'Aprano
> wrote:
>> Chris Angelico wrote:
>>
>>> Yeah; like I said, "Don't" is the short answer. There will be
>>> exceptions, some extremely rare situations when system mod
if obj == target:
results.append(i)
return results
index_all(x, "x3")
=> returns [1, 3]
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
mes = True)
> print("found %d devices" % len(nearby_devices))
>
>
> The function can discover all of them ? 300 bluetooth mac address?
You will have to ask the author of the bluetooth module. Where did you find
it? Does it come with documentation? Did you read it?
--
S
hink suggesting comprehensions in an answer should be reserved for
> people at levels 3 and 4. Maybe level 2-1/2. Certainly not level 1.
Yes, this! Strongly agreed.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
on a pc as a drive at all.
>> For example the Samsung gs4.
>
> This is actually true for ALL android devices, starting with Android 3.0.
o_O
Android phones don't mount as storage devices?
Oh well, that's Android crossed off my list.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
...") I can't see any way to realistically attack the password
generator based on the weakness of the random number generator. Perhaps I'm
missing something?
> Someone should write a cryptographically secure pseudorandom number
> generator library for Python. :(
Here, let me google that for you :-)
https://duckduckgo.com/html/?q=python+crypto
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
eralised print.
Wait... I get it... you have a print, it's just a function, not a statement.
Am I close?
> Instead if we treated the python:
>
> [x**2 for x in range(10)]
>
> as an executable version for the standard set-theory expression:
>
> {x² | x ∈ [0.
n+1] = x[n] + 1
we have a perfectly good mathematical recursive definition. All it needs is
an initial value x[0] and we're good to go.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Devin Jeanpierre wrote:
> On Sun, Aug 10, 2014 at 9:31 AM, Steven D'Aprano
> wrote:
>> I don't think that using a good, but not cryptographically-strong, random
>> number generator to generate passwords is a serious vulnerability. What's
>> your threat mo
t;. That's what I mean by
>> first you come up with an algorithm, then you implement it in code.
>
>>>> l= [6,2,9,12,1,4]
>>>> sorted(l,reverse=True)[:5]
> [12, 9, 6, 4, 2]
>
> No need to know how sorted works nor [:5]
>
> Now you (or Steven) can
but I do care if the two lines are
mixed in together, something like this:
spam spaeggs eggs m seggspams
Does print perform its own locking to prevent this?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ext does not necessarily have the same meaning as in another context.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
O Python is designed
> by great Guido van Rossum then what is the future of Python( Guido van
> Rossum, GREAT man, but STILL just one person)? "
Haven't you heard? Guido has retired.
http://legacy.python.org/dev/peps/pep-0401/
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ew experimental asynchronous CPUs,
computers are all based on CPUs with an internal clock signal which
synchronizes distinct parts of the circuit with each other.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 10 Aug 2014 21:29:12 -0700, Rustom Mody wrote:
> On Monday, August 11, 2014 8:30:32 AM UTC+5:30, Steven D'Aprano wrote:
>
>> You did the same thing in your own course, the only difference being
>> you accepted a different set of primitive functions. But ul
Chris Angelico wrote:
> On Mon, Aug 11, 2014 at 7:44 PM, Steven D'Aprano
> wrote:
>> And even when you can
>> parallelize a series of tasks, it's
>
> ... easy for one task to get aborted part way while the rest of the
> tasks continue on, oblivious to the a
INADA Naoki wrote:
> On Python 3, print is thread safe.
>
> But Python 2 has broken scenario:
Is this documented somewhere?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Cameron Simpson wrote:
> On 12Aug2014 02:07, Steven D'Aprano
> wrote:
>>INADA Naoki wrote:
>>
>>> On Python 3, print is thread safe.
>>> But Python 2 has broken scenario:
>>
>>Is this documented somewhere?
>
> In python/2.7.6/reference/
or one reason or another) is missing some of the
referenced posts, possibly because they have expired, or were never
delivered in the first place.
So please stop being rude, and follow the convention of both email and
usenet (as well as broader society) to give attribution to those you quote.
On Mon, 11 Aug 2014 19:27:25 -0500, Tim Chase wrote:
> On 2014-08-12 10:11, Steven D'Aprano wrote:
>> It is rude to deliberately refuse to give attributes
>
> While I find this true for first-level attribution, I feel far less
> obligation to attribute additional levels
ike that
> off the 'inspect element' or 'source' htaml pages, on www.Racingpost.com.
Specifically those pages? Doubtful.
If you are really lucky (1) somebody else has already done the programming,
(2) they've made their program available to others, and (3) you can
Chris Angelico wrote:
> On Mon, Aug 11, 2014 at 7:44 PM, Steven D'Aprano
> wrote:
>> I think this is why both declarative and functional programming idioms
>> will remain niche (although important niches). Most tasks are inherently
>> imperative to at least so
y abstraction of the concept of
sorting a collection. Both are abstractions, because they are *intended* to
gloss over real world details of Real numbers and sorting, but both leak
because the implementation of the abstraction spoils the abstraction.
http://www.joelonsoftware.com/articles/LeakyAbstractions.html
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
[...]
> I am using "abstract" in the sense of an abstraction, as opposed to
> something concrete and real, not as a mechanism for specifying interfaces
> in Java or Python. Python's float is a leaky abstraction of mathematical
> Real numbers,
e only works in
certain versions of Python 2? E.g. raising bare strings only works up to
Python 2.5, in 2.6 and higher it is a syntax error.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
didn't even know about __self__, but I understood __func__
to be public. And yes, it should be public: being able to introspect a
method and find the function it came from is a good thing, and sometimes
useful.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
of log2, the simplest way
is calculate it like this:
def log2(n):
"""Return the floor of log2(n)."""
if n <= 0: raise ValueError
i = -1
while n:
n //= 2
i += 1
return i
log2(511)
=> returns 8
log2(512)
=> returns 9
log2(
Wolfgang Keller wrote:
> I've been using mail and news for over 20 years now, you definitely
> don't need to teach me anything.
Except common courtesy.
You may have been rude for over 20 years, but I don't have to put up with it
for a second longer.
> Good Bye,
Agree
e "", line 1, in
AttributeError: type object 'str' has no attribute '__radd__'
This is especially astonishing, since int and float both have __radd__
methods, and yet numeric addition is commutative (x+y == y+x) whereas the
same is not true for string concatena
d it for stuff, so dont worry
:-)
You'll only use it for good, right?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Ethan Furman wrote:
> On 08/13/2014 09:00 AM, Steven D'Aprano wrote:
>>
>> What is the rationale for str not having __radd__ method?
>
> At a guess I would say because string only knows how to add itself to
> other strings, so __add__ is sufficient.
# Pyt
Nothing to do with Python, but awesome: "OpenOffice won't print on
Tuesdays".
https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161/comments/28
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
The BDFL Guido van Rossum is considering optional static typing (ish) for
Python 3.5:
https://mail.python.org/pipermail/python-ideas/2014-August/028618.html
Does anyone here use function annotations? If so, what do you use them
for?
--
Steven
--
https://mail.python.org/mailman/listinfo
id development on his PC, instead of poking at
the virtual keyboard on a screen the size of your palm, being able to
test the software on the PC (under emulation) rather than having to
upload it to your phone is very useful.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
es of code, and deals with
generator .close() and .throw() methods, error checking, and various other
issues. That is why "yield from" was added to Python. The simple case is
too simple to care about, the complicated cases are too complicated to
expect people to write their own solutions, so it was added to the
language.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ve you garbage.
* Fix your system to use UTF-8 by default.
* Fix your editor to use UTF-8.
* Add a UTF-8 encoding declaration.
And then things should work.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
lib
contour plot", and it only took that long because I misspelled "contour"
the first time.
http://matplotlib.org/examples/pylab_examples/contour_demo.html
Does this help? If not, please explain what experience you have with
matplotlib, what you have tried, what you expected it
],
... [9.5, 8.1, 7.0, 6.2] ]) # Two dimensional array
py> b
array([[ 1.2, 2.5, 3.7, 4.8],
[ 9.5, 8.1, 7. , 6.2]])
One dimensional arrays are made from a single list of numbers: [...]
Two dimensional arrays are made from a list of lists: [ [...], [...] ]
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ou can check the dimensions by storing the array into a variable like this:
py> a = numpy.array([[[ 2, 2, 2, 1, 2]], [[ 8, 8, 8, 7, 8]]])
py> a.shape
(2, 1, 5)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
and replaced it with a different one? Did you
update Python to a new version?
Have you changed the regex search pattern?
Has the text you are searching changed? Websites upgrade their HTML quite
frequently. Perhaps the Boost website has changed enough to break your
regex.
--
Steven
--
https://m
difference to performance?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
First you need to find out why Python is
trying to convert to ASCII. That's probably because of something Apache is
doing. Do you have an Apache technician you can ask?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ing="utf-8" )
That makes no sense. If you're reading in binary mode, there's no encoding.
Every byte represents itself.
> f = open( "/var/www/cgi-data/index.html", "r", encoding="utf-8" )
That's the bunny!
If you just want to hide the prob
1')
'Hello World! é ü Ã\xa0 Å©'
which appears to be exactly what you have. Why Latin-1 instead of ASCII?
Because the process has to output *something*, and Latin-1 is sometimes
called "extended ASCII".
I'm starting to fear a bug in Python 3.4, but since I have almost no
knowledge about wsgi and cgi, I can't be sure that this isn't just normal
expected behaviour :-(
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
nd the GIL will just be an embarrassment, but today
is not that day. I wonder whether Ruby programmers are as obsessive about
Ruby's GIL?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
Johannes Bauer wrote:
> On 17.08.2014 16:21, Steven D'Aprano wrote:
>> Coincidentally after reading Armin Ronacher's criticism of the GIL in
>> Python:
>>
>> http://lucumr.pocoo.org/2014/8/16/the-python-i-would-like-to-see/
>
> Sure that's the r
a local, but how about b
and c? Are they globals or attributes of the instance? Python decided on
giving globals (well, actually nonlocals) priority, and requiring an
explicit self, so we can write this:
def method(self):
a = self.b + len(c)
instead of this:
def method():
locals.a = b + globals.len(globals.c)
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ss for each core instead.
Ironically, using threads for email in Python is probably going to work
quite well, since it is limited by I/O and not CPU.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
OAD_CONST 2 (2)
3 POP_TOP
4 LOAD_CONST 1 (None)
7 RETURN_VALUE
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ion 4.0, when it comes out, will merely be a return to past practices in
Python-land, which are quite similar to practices in many major software
packages. Version 3.0 was the anomaly.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ady arrays.
a = np.array([hs_con_sw, te_con_sw])
ought to do what you want. That's a list [] of arrays, hence
two-dimensional.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ent. It's not very complicated.
I wouldn't worry about Apple users for the time being. Let's see if we can
get it accepted first.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
ings an error.
# 2.4
py> raise "hello"
Traceback (most recent call last):
File "", line 1, in ?
hello
# 2.6
py> raise "hello"
Traceback (most recent call last):
File "", line 1, in
TypeError: exceptions must be old-style classes or derived fr
s over tabs, because some tools
can't deal with tabs correctly.) Rather than fix the tools, the Haskell
community removed non-numeric tags from the specification.
On the other hand, Oracle and Sun before them take the attitude that a jump
in Java's version number from 5 to 6 to 7 are only minor release changes,
and the Java community is quite happy to agree.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
s a surname
since her marriage. Prior to her marriage, she used "Elizabeth Windsor"
on those rare occasions that "Princess Elizabeth" or "Queen Elizabeth II"
was not sufficient. Her children, should they need a surname, use
Mountbatten-Windsor. Prince William
uctant to install software by hand if it wasn't handled by my
system's package manager. I still am, but not as reluctant as I was back
then.
(3) I was still learning the language, and all the books I had on Python
covered 1.5.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
rt (X == Y or id(X) != id(Y))
Traceback (most recent call last):
File "", line 1, in
AssertionError
This demonstrates that the condition
(X == Y or id(X) != id(Y))
fails to tell us anything useful about identity, since it is sometimes true
and sometimes false.
You cannot understand identity from first principles, precisely because it
is not a metaphysical concept in Python. In Python it is defined by and in
terms of the concrete programming model of the language.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
doversion; guidoprint(guidoversion)-ly yr's,
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
8301 - 8400 of 15565 matches
Mail list logo