The language D has a feature called Uniform Function Call Syntax, which allows
instance methods to be resolved using function calls.
In Python terms, the call:
x.len()
would first check if 'x' has a method 'len', and would then look for a function
'len', passing 'x' as the first argument.
The
Hello Python List,
Elektra provides a universal and secure framework to store configuration
parameters in a global, hierarchical key database. The core is a small
library implemented in C. The plugin-based framework fulfills many
configuration-related tasks to avoid any unnecessary code duplica
Dan Stromberg writes:
> I have some code for a web server. Right now, it uses
> BaseHTTPRequestHandler with Basic Auth, but we want to be able to log
> out, and there doesn't appear to be a general way to log out of
> something using Basic Auth, short of turning to unportable JavaScript.
You ca
On Fri, 06 Jun 2014 20:41:09 -0600, Michael Torrie wrote:
> On 06/06/2014 12:28 AM, Travis Griggs wrote:
>>
>>
>>> On Jun 5, 2014, at 1:14, Alain Ketterlin
>>> wrote:
>>>
>>> Swift's memory management is similar to python's (ref. counting).
>>> Which makes me think that a subset of python with
On Fri, 06 Jun 2014 17:14:54 -0700, Dan Stromberg wrote:
> Is there a way of decorating method1 of class C using method2 of class
> C?
Yes. See below.
> It seems like there's a chicken-and-the-egg problem; the class doesn't
> seem to know what "self" is until later in execution so there's
> appa
On 06/06/2014 01:42 AM, Johannes Bauer wrote:
Ah, I didn't know rstrip() accepted parameters and since you wrote
line.rstrip() this would also cut away whitespaces (which sadly are
relevant in odd cases).
No problem. If a parameter is used in the strip() family, than _only_ those characters
On 06/06/2014 12:28 AM, Travis Griggs wrote:
>
>
>> On Jun 5, 2014, at 1:14, Alain Ketterlin
>> wrote:
>>
>> Swift's memory management is similar to python's (ref. counting).
>> Which makes me think that a subset of python with the same type
>> safety would be an instant success.
>
> Except th
On 2014-06-06 09:59, Travis Griggs wrote:
> On Jun 4, 2014, at 4:01 AM, Tim Chase wrote:
> > If you use UTF-8 for everything
>
> It seems to me, that increasingly other libraries (C, etc), use
> utf8 as the preferred string interchange format.
I definitely advocate UTF-8 for any streaming scenari
Chris Angelico writes:
> On Fri, Jun 6, 2014 at 12:16 PM, Nikolaus Rath wrote:
>> - Is there some way to make the call stack for destructors less confusing?
>
> First off, either don't have refloops, or explicitly break them.
The actual code isn't as simple as the example. I wasn't even aware
t
Alain Ketterlin wrote:
>> When is static analysis actually needed and for what purpose?
>
> For example WCET analysis (where predictability is more important than
> performance). Or code with strong security constraint. Or overflow
> detection tools. Or race condition analyzers. And there are ma
Alain Ketterlin wrote:
> Sturla Molden writes:
>
>> Alain Ketterlin wrote:
>>
>>> Many of these students suggest Python as the
>>> development language (they learned it and liked it), and the suggestion
>>> is (almost) always rejected, in favor of Java or C# or C/C++.
>>
>> And it was almost
On 6/6/2014 8:14 PM, Dan Stromberg wrote:
Is there a way of decorating method1 of class C using method2 of class C?
It seems like there's a chicken-and-the-egg problem; the class doesn't
seem to know what "self" is until later in execution so there's
apparently no way to specify @self.method2 wh
In article ,
Dan Stromberg wrote:
> I have some code for a web server. Right now, it uses
> BaseHTTPRequestHandler with Basic Auth, but we want to be able to log
> out, and there doesn't appear to be a general way to log out of
> something using Basic Auth, short of turning to unportable JavaSc
Dan Stromberg writes:
> Is there a way of decorating method1 of class C using method2 of class
> C?
Can you give a concrete example (i.e. not merely hypothetical) where
this would be a useful feature (i.e. an actual improvement over the
absence of the feature), and why?
> It seems like there's
On Sat, Jun 7, 2014 at 10:14 AM, Dan Stromberg wrote:
> Is there a way of decorating method1 of class C using method2 of class C?
>
> It seems like there's a chicken-and-the-egg problem; the class doesn't
> seem to know what "self" is until later in execution so there's
> apparently no way to spec
Is there a way of decorating method1 of class C using method2 of class C?
It seems like there's a chicken-and-the-egg problem; the class doesn't
seem to know what "self" is until later in execution so there's
apparently no way to specify @self.method2 when def'ing method1.
--
https://mail.python.
I have some code for a web server. Right now, it uses
BaseHTTPRequestHandler with Basic Auth, but we want to be able to log
out, and there doesn't appear to be a general way to log out of
something using Basic Auth, short of turning to unportable JavaScript.
And this needs first and foremost to b
On Sat, Jun 7, 2014 at 7:18 AM, Denis McMahon wrote:
>> into the lowest seven bits of a byte, with the high byte left clear.
>
> high BIT left clear.
That thing. Unless you have bytes inside bytes (byteception?), you'll
only have room for one high bit. Some day I'll get my brain and my
fingers to
On Sat, 07 Jun 2014 01:50:50 +1000, Chris Angelico wrote:
> Yes and no. "ASCII" means two things:
ASCII means: American Standard Code for Information Interchange aka ASA
Standard X3.4-1963
> into the lowest seven bits of a byte, with the high byte left clear.
high BIT left clear.
--
Denis Mc
On 06/06/2014 22:58, Dave Angel wrote:
Chris Angelico Wrote in message:
On Sat, Jun 7, 2014 at 4:15 AM, R Johnson
wrote:
The subject line isn't as important as a header, carried invisibly
through, that says that you were replying to an existing post. :)
Sorry for my ignorance, but I've neve
Chris Angelico Wrote in message:
> On Sat, Jun 7, 2014 at 4:15 AM, R Johnson
> wrote:
>>> The subject line isn't as important as a header, carried invisibly
>>> through, that says that you were replying to an existing post. :)
>>
>> Sorry for my ignorance, but I've never edited email headers befo
I have been using os.startfile(filepath) to launch files I've created in
Python, mostly Excel spreadsheets, text files, or PDFs.
When I run my script from my IDE, the file opens as I expect. But if I go back
to my script and re-run it, the external program (either Excel, Notepad, or
Acrobat Re
In article <17ad7280-65dd-4db9-9f4a-7bdd8bb7c...@googlegroups.com>,
Aseem Bansal wrote:
> The Python website is undergoing an overhaul for better looks. Is there
> anything like a forum where it is being discussed. I mean where the schedule
> for this is being maintained or the same is being di
The Python website is undergoing an overhaul for better looks. Is there
anything like a forum where it is being discussed. I mean where the schedule
for this is being maintained or the same is being discussed?
--
https://mail.python.org/mailman/listinfo/python-list
On 2014-06-06 15:37:24 +, Strae said:
Ho acquistato un server di test in canada; Installato debian 7, settato
il timezone di Roma tramite dpkg-reconfigure tzdata e sembra tutto ok;
Però sembra che python di default prenda sempre il timezone canadese
I'm on a very similar setup (Wheezy, se
On 6/6/14 1:47 PM, Frank B wrote:
Ok; thanks for the underscore and clarification. Just need to adjust my
thinking a bit.
Did this come up in real code? I've seen this point about
finally/return semantics a number of times, but haven't seen real code
that needed adjusting based on it.
-
On Sat, Jun 7, 2014 at 4:15 AM, R Johnson
wrote:
>> The subject line isn't as important as a header, carried invisibly
>> through, that says that you were replying to an existing post. :)
>
> Sorry for my ignorance, but I've never edited email headers before and
> didn't find any relevant help on
> The subject line isn't as important as a header, carried invisibly
> through, that says that you were replying to an existing post. :)
Sorry for my ignorance, but I've never edited email headers before and
didn't find any relevant help on Google. Could you please give some more
details about
Ok; thanks for the underscore and clarification. Just need to adjust my
thinking a bit.
--
https://mail.python.org/mailman/listinfo/python-list
In article <0a89c96d-de62-42ad-be48-6107ce10d...@googlegroups.com>,
Frank B wrote:
> Ok; this is a bit esoteric.
>
> So finally is executed regardless of whether an exception occurs, so states
> the docs.
>
> But, I thought, if I from my function first, that should take
> precedence.
>
> a
Ok; this is a bit esoteric.
So finally is executed regardless of whether an exception occurs, so states the
docs.
But, I thought, if I from my function first, that should take
precedence.
au contraire
Turns out that if you do this:
try:
failingthing()
except FailException:
return 0
fina
On 6/6/14 1:11 PM, Marko Rauhamaa wrote:
Steven D'Aprano :
On Fri, 06 Jun 2014 18:32:39 +0300, Marko Rauhamaa wrote:
Unicode, like ASCII, is a code. Representing text in unicode is
encoding.
A Unicode string as an abstract data type has no encoding.
Unicode itself is an encoding. See it in
In article ,
Travis Griggs wrote:
> On Jun 4, 2014, at 4:01 AM, Tim Chase wrote:
>
> > If you use UTF-8 for everything
>
> It seems to me, that increasingly other libraries (C, etc), use utf8 as the
> preferred string interchange format. It¹s universal, not prone to endian
> issues, etc.
O
On Sat, Jun 7, 2014 at 3:13 AM, Rustom Mody wrote:
> On Friday, June 6, 2014 10:32:47 PM UTC+5:30, Marko Rauhamaa wrote:
>> Chris Angelico :
>
>> > "ASCII" means two things: Firstly, it's a mapping from the letter A to
>> > the number 65, from the exclamation mark to 33, from the backslash to
>> >
On Sat, Jun 7, 2014 at 3:04 AM, Rustom Mody wrote:
>> ASCII was once your one companion, it was all that mattered. ASCII was
>> once a friendly encoding, then your world was shattered. Wishing it
>> were somehow here again, wishing it were somehow near... sometimes it
>> seemed, if you just dreame
Marko Rauhamaa :
> Far from it. It is a mapping from symbols to integers. The symbols are
> the Platonic ones.
Well, of course, even the symbols are a code. Letters code sounds and
digits code numbers.
And the sounds and numbers code ideas. Now we are getting close to being
truly Platonic.
Mar
On Sat, Jun 7, 2014 at 3:11 AM, Marko Rauhamaa wrote:
> Encoding is not tied to bytes or even computers. People can speak in
> code, after all.
Obligatory: http://xkcd.com/257/
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, June 6, 2014 10:32:47 PM UTC+5:30, Marko Rauhamaa wrote:
> Chris Angelico :
> > "ASCII" means two things: Firstly, it's a mapping from the letter A to
> > the number 65, from the exclamation mark to 33, from the backslash to
> > 92, and so on. And secondly, it's an encoding of those num
Steven D'Aprano :
> On Fri, 06 Jun 2014 18:32:39 +0300, Marko Rauhamaa wrote:
>> Unicode, like ASCII, is a code. Representing text in unicode is
>> encoding.
>
> A Unicode string as an abstract data type has no encoding.
Unicode itself is an encoding. See it in action here:
72 101 108 108 11
On Friday, June 6, 2014 10:18:41 PM UTC+5:30, Chris Angelico wrote:
> On Sat, Jun 7, 2014 at 2:21 AM, Rustom Mody wrote:
> > Combine that with Chris':
> >> Yes and no. "ASCII" means two things: Firstly, it's a mapping from the
> >> letter A to the number 65, from the exclamation mark to 33, from t
On 6/6/2014 7:11 AM, Alain Ketterlin wrote:
Terry Reedy writes:
On 6/5/2014 4:07 PM, Alain Ketterlin wrote:
When I compile Cython modules I use LLVM on this computer.
Cython is not Python, it is another language, with an incompatible
syntax.
Cython compiles Python with optional extension
Chris Angelico :
> "ASCII" means two things: Firstly, it's a mapping from the letter A to
> the number 65, from the exclamation mark to 33, from the backslash to
> 92, and so on. And secondly, it's an encoding of those numbers into
> the lowest seven bits of a byte, with the high byte left clear.
On Jun 4, 2014, at 4:01 AM, Tim Chase wrote:
> If you use UTF-8 for everything
It seems to me, that increasingly other libraries (C, etc), use utf8 as the
preferred string interchange format. It’s universal, not prone to endian
issues, etc. So one *advantage* you gain for using utf8 internall
On Sat, Jun 7, 2014 at 2:21 AM, Rustom Mody wrote:
> Combine that with Chris':
>
>> Yes and no. "ASCII" means two things: Firstly, it's a mapping from the
>> letter A to the number 65, from the exclamation mark to 33, from the
>> backslash to 92, and so on. And secondly, it's an encoding of those
On Friday, June 6, 2014 9:27:51 PM UTC+5:30, Steven D'Aprano wrote:
> On Fri, 06 Jun 2014 18:32:39 +0300, Marko Rauhamaa wrote:
> > Michael Torri:
> >> On 06/06/2014 08:10 AM, Marko Rauhamaa wrote:
> >>> Ethan Furman :
> ASCII is *not* the state of "this string has no encoding" -- that
>
On Fri, 06 Jun 2014 18:32:39 +0300, Marko Rauhamaa wrote:
> Michael Torrie :
>
>> On 06/06/2014 08:10 AM, Marko Rauhamaa wrote:
>>> Ethan Furman :
ASCII is *not* the state of "this string has no encoding" -- that
would be Unicode; a Unicode string, as a data type, has no encoding.
>>>
On Sat, Jun 7, 2014 at 1:32 AM, Marko Rauhamaa wrote:
> Michael Torrie :
>
>> On 06/06/2014 08:10 AM, Marko Rauhamaa wrote:
>>> Ethan Furman :
ASCII is *not* the state of "this string has no encoding" -- that
would be Unicode; a Unicode string, as a data type, has no encoding.
>>>
>>> Hu
Ho acquistato un server di test in canada; Installato debian 7, settato il
timezone di Roma tramite dpkg-reconfigure tzdata e sembra tutto ok;
Però sembra che python di default prenda sempre il timezone canadese:
import os, time
from time import strftime
strftime("%H") # Le 18 sono le 23!
Ora,
Whoops sorry, i thought this was the italian group
--
https://mail.python.org/mailman/listinfo/python-list
Michael Torrie :
> On 06/06/2014 08:10 AM, Marko Rauhamaa wrote:
>> Ethan Furman :
>>> ASCII is *not* the state of "this string has no encoding" -- that
>>> would be Unicode; a Unicode string, as a data type, has no encoding.
>>
>> Huh?
>
> [...]
>
> What part of his statement are you saying "Huh
On Fri, Jun 6, 2014 at 11:24 PM, Ethan Furman wrote:
> On 06/05/2014 11:30 AM, Marko Rauhamaa wrote:
>>
>>
>> How text is represented is very different from whether text is a
>> fundamental data type. A fundamental text file is such that ordinary
>> operating system facilities can't see inside the
On 06/06/2014 08:10 AM, Marko Rauhamaa wrote:
> Ethan Furman :
>> ASCII is *not* the state of "this string has no encoding" -- that
>> would be Unicode; a Unicode string, as a data type, has no encoding.
>
> Huh?
It's this very fact that trips of JMF in his rants about FSR. Thank you
to Ethan fo
On 06/05/2014 09:32 AM, Steven D'Aprano wrote:
But whatever the situation, and despite our differences of opinion about
Unicode, THANK YOU for having updated ReportLabs to 3.3.
+1000
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
On 06/06/2014 07:39 AM, Deogratius Musiige wrote:
> Thanks a lot mate.
>
> You just made my day.
> I have looked around the net but cannot find the controls available.
>
> I would like to be able to:
> - get current playing track
> - get wmplayer state (playing/paused/stopped)
> - get the sele
On 2014-06-06, Roy Smith wrote:
>> Roy is using MT-NewsWatcher as a client.
>
> Yes. Except for the fact that it hasn't kept up with unicode, I find
> the U/I pretty much perfect. I imagine at some point I'll be force to
> look elsewhere, but then again, netnews is pretty much dead.
There ar
Ethan Furman :
> On 06/05/2014 11:30 AM, Marko Rauhamaa wrote:
>> A fundamental text file is such that ordinary operating system
>> facilities can't see inside the black box (that is, they are *not*
>> encoded as far as the applications go).
>
> Of course they are.
How would you know?
> It may b
On 06/05/2014 11:30 AM, Marko Rauhamaa wrote:
>
How text is represented is very different from whether text is a
fundamental data type. A fundamental text file is such that ordinary
operating system facilities can't see inside the black box (that is,
they are *not* encoded as far as the applicati
Thanks a lot mate.
You just made my day.
I have looked around the net but cannot find the controls available.
I would like to be able to:
- get current playing track
- get wmplayer state (playing/paused/stopped)
- get the selected sound device
Thanks a lot
Br
Deo
-Original Message-
F
On 06/06/2014 10:03, Jamie Mitchell wrote:
On Thursday, June 5, 2014 4:54:16 PM UTC+1, Jamie Mitchell wrote:
Hello all!
Instead of setting the number of bins I want to set the bin width.
I would like my bins to go from 1.7 to 2.4 in steps of 0.05.
How do I say this in the code?
Cheer
Steven D'Aprano :
> Incorrect. Linux presents data as text all the time. Look at the prompt:
> its treated as text, not numbers.
Of course there is a textual human interface. However, from the point of
view of virtually every OS component, it's bytes.
> Consider:
>
> [steve@ando ~]$ echo -e '\
On Monday, 2 June 2014 09:38:44 UTC+5:30, sukesh.b...@thomsonreuters.com wrote:
> Hi,
>
>
>
> Using python(2.7.2) I am not able to connect to Vector Wise database. Can you
> suggest me how I can connect to it. If you don't mind step by step
> L.
>
>
>
> Regards,
>
> Sukesh.
--
https://
On Fri, 06 Jun 2014 02:21:54 +0300, Marko Rauhamaa wrote:
> Steven D'Aprano :
>
>> In any case, I reject your premise. ALL data types are constructed on
>> top of bytes,
>
> Only in a very dull sense.
I agree with you that this is a very dull, unimportant sense. And I think
it's dullness appli
On Fri, Jun 6, 2014 at 9:20 PM, Alain Ketterlin
wrote:
>> It's impossible to accidentally call a base class's method when you
>> ought to have called the overriding method in the subclass, which is a
>> risk in C++ [2].
>
> I don't how this can happen in C++, unless you actually have an instance
>
On 05/06/2014 18:16, Ian Kelly wrote:
.
How should e.g. bytes.upper() be implemented then? The correct
behavior is entirely dependent on the encoding. Python 2 just assumes
ASCII, which at best will correctly upper-case some subset of the
string and leave the rest unchanged, and at wor
On Fri, 06 Jun 2014 10:47:44 +0200, Johannes Bauer wrote:
> Hm, I was under the impression that Python already took care of removing
> the \r at a line ending. Checking that right now:
[snip example]
This is called "Universal Newlines". Technically it is a build-time
option which applies when yo
Sturla Molden writes:
> On 05/06/14 22:27, Alain Ketterlin wrote:
>> I have seen dozens of projects where Python was dismissed because of the
>> lack of static typing, and the lack of static analysis tools.
[...]
> When is static analysis actually needed and for what purpose?
For example WCET a
Wiktor writes:
> On Fri, 6 Jun 2014 03:37:56 +1000, Chris Angelico wrote:
>
>> On Fri, Jun 6, 2014 at 2:56 AM, Wiktor wrote:
>>> I guess, I'll try to do what Chris proposed. Forget about this
>>> implementation and write python script from the scratch looking only at the
>>> original JavaScrip
Chris Angelico writes:
> On Fri, Jun 6, 2014 at 7:23 AM, Mark Lawrence wrote:
>> On 05/06/2014 21:07, Alain Ketterlin wrote:
>>>
>>> Sturla Molden writes:
>>>
On 05/06/14 10:14, Alain Ketterlin wrote:
> Type safety.
Perhaps. Python has strong type safety.
>>>
>>> Come on
Sturla Molden writes:
> Alain Ketterlin wrote:
>
>> Many of these students suggest Python as the
>> development language (they learned it and liked it), and the suggestion
>> is (almost) always rejected, in favor of Java or C# or C/C++.
>
> And it was almost always the wrong decision...
I think
Terry Reedy writes:
> On 6/5/2014 4:07 PM, Alain Ketterlin wrote:
>
>>> When I compile Cython modules I use LLVM on this computer.
>>
>> Cython is not Python, it is another language, with an incompatible
>> syntax.
>
> Cython compiles Python with optional extensions that allow additional
> speed
On 05/06/2014 22:56, Mark Lawrence wrote:
On 05/06/2014 22:42, Ned Deily wrote:
In article ,
Rustom Mody wrote:
On Thursday, June 5, 2014 10:21:06 PM UTC+5:30, Robin Becker wrote:
I used to create exe files for windows, but the latest and greatest concept
is
wheels .whl files.
If someone
Thanks a lot Ian. Your post helped me understand the problem in a much better
way and I've solved the first objective thanks to you but incase of my second
objective which is minimize the number of nodes, I have got one of the weirdest
looking constraints which I don't know how to express in Pyt
On 2014-06-06 10:47, Johannes Bauer wrote:
> > Personally I tend toward rstrip('\r\n') so that I don't have to
> > worry about files with alternative line terminators.
>
> Hm, I was under the impression that Python already took care of
> removing the \r at a line ending. Checking that right now:
>
Classic Arcade Games for Windows at:
http://home.eol.ca/~knave/index.htm
E-mail questions to: kn...@eol.ca
--
Books and Games at:
http://home.eol.ca/~knave/index.htm
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> I don't have an actual use-case for this, as I don't target
> microcontrollers, but I'm curious: What parts of Py3 syntax aren't
> supported?
I meant to say % formatting for strings but that's apparently been added
recently. My previous micropython build was from Februa
Hi there,
I would like to overlay some boxplots onto a time series.
I have tried pylab.hold(True) in between the two plots in my code but this
hasn't worked.
The problem is that the x-axes of the boxplots and the time series are not the
same.
Code for time series:
python2.7
import netCDF4
im
On Thursday, June 5, 2014 4:54:16 PM UTC+1, Jamie Mitchell wrote:
> Hello all!
>
>
>
> Instead of setting the number of bins I want to set the bin width.
>
>
>
> I would like my bins to go from 1.7 to 2.4 in steps of 0.05.
>
>
>
> How do I say this in the code?
>
>
>
> Cheers,
>
>
>
On 05.06.2014 22:18, Ian Kelly wrote:
> Personally I tend toward rstrip('\r\n') so that I don't have to worry
> about files with alternative line terminators.
Hm, I was under the impression that Python already took care of removing
the \r at a line ending. Checking that right now:
(DOS encoded f
On 05.06.2014 20:52, Ryan Hiebert wrote:
> 2014-06-05 13:42 GMT-05:00 Johannes Bauer :
>
>> On 05.06.2014 20:16, Paul Rubin wrote:
>>> Johannes Bauer writes:
line = line[:-1]
Which truncates the trailing "\n" of a textfile line.
>>>
>>> use line.rstrip() for that.
>>
>> rstrip has diffe
Travis Griggs writes:
>> On Jun 5, 2014, at 1:14, Alain Ketterlin wrote:
>>
>> Swift's memory management is similar to python's (ref. counting). Which
>> makes me think that a subset of python with the same type safety would
>> be an instant success.
>
> Except that while you don't need to regu
On Thu, 5 Jun 2014 17:17:19 -0500 (CDT), Dave Angel wrote:
>R Johnson Wrote in message:
>
>>
>> I've attached some new sample code in which I've attempted to correct
>> various things that you mentioned.
>
>Attachments don't work well for many people using this list. I
> for one can't even s
Marko Rauhamaa writes:
> Steven D'Aprano :
>
>> Nevertheless, there are important abstractions that are written on top
>> of the bytes layer, and in the Unix and Linux world, the most
>> important abstraction is *text*. In the Unix world, text formats and
>> text processing is much more common in
82 matches
Mail list logo