Random832 writes:
> Jussi Piitulainen writes:
>> I think the best way is to say that a[0] and a[1] are the same
>> object, while b[0] and b[1] are different objects.
>
> Sure, you can *say* that. But how do you draw it on a diagram with
> sticky notes or parcel tags or whatever?
I prefer to outlin
Hello, there.
MRAB, thank you for teaching me proper Python syntax for how I tried to
use the or operator.
Dennis, I must have learned allot recently as I believe I understood 99%
of that code. I see how it is not just more advanced, but actually better
than what I had. However, line 47 (c
[Alex]
>>> I will try to create a zoneinfo wrapping prototype as well, but I will
>>> probably "cheat" and build it on top of pytz.
[Tim]
>> It would be crazy not to ;-) Note that Stuart got to punt on "the
>> hard part": .utcoffset(), since pytz only uses fixed-offset classes.
>> For a prototy
Michael Torrie writes:
> On 09/12/2015 08:22 PM, Mark Lawrence wrote:
> > You appear to have the same level of knowledge of Python internals as
> > the RUE has of the Python 3.3+ FSR unicode implementation. Let's have
> > some fun, is Python pass by value or pass by reference? It has to be
>
On 09/12/2015 08:22 PM, Mark Lawrence wrote:
> You appear to have the same level of knowledge of Python internals as
> the RUE has of the Python 3.3+ FSR unicode implementation. Let's have
> some fun, is Python pass by value or pass by reference? It has to be
> more interesting debating that t
On Sun, 13 Sep 2015 07:10 am, Random832 wrote:
> Jussi Piitulainen writes:
>> I think the best way is to say that a[0] and a[1] are the same object,
>> while b[0] and b[1] are different objects.
>
> Sure, you can *say* that. But how do you draw it on a diagram with
> sticky notes or parcel tags
On 09/11/2015 11:22 PM, Skybuck Flying wrote:
> I didn't learn anything from this posting, sorry ! ;)
I too am not surprised. You're not here to learn, either about
programming language theory, or about Python apparently.
I would refer you to a good programming language theory class, but I
suspe
On Saturday, September 12, 2015 at 10:23:24 PM UTC-4, Mark Lawrence wrote:
> On 13/09/2015 01:44, rurpy--- via Python-list wrote:
> > On 09/12/2015 06:02 PM, Ned Batchelder wrote:
> >> On Saturday, September 12, 2015 at 7:15:18 PM UTC-4, Mark Lawrence wrote:
> >> [...]
> >> But in C, pointers mean
[Tim]
>> Me too - except I think acceptance of 495 should be contingent upon
>> someone first completing a fully functional (if not releasable)
>> fold-aware zoneinfo wrapping.
[Alex]
> Good idea. How far are you from completing that?
In my head, it was done last week ;-) In real life, I'm runn
On 13/09/2015 01:44, rurpy--- via Python-list wrote:
On 09/12/2015 06:02 PM, Ned Batchelder wrote:
On Saturday, September 12, 2015 at 7:15:18 PM UTC-4, Mark Lawrence wrote:
[...]
But in C, pointers mean more than that. You can perform arithmetic on
them, to access memory as a linearly addressed
On Sat, Sep 12, 2015 at 5:46 PM, Alexander Belopolsky <
alexander.belopol...@gmail.com> wrote:
>
> On Sat, Sep 12, 2015 at 6:24 PM, Guido van Rossum
> wrote:
>
>> The repeated claims (by Alexander?) that astimezone() has the power of
>> pytz's localize() need to stop.
>
>
> Prove me wrong! :-)
>
[Guido]
>> Those pytz methods work for any (pytz) timezone -- astimezone() with a
>> default argument only works for the local time zone.
{Alex]
> That's what os.environ['TZ'] = zonename is for. The astimezone() method
> works for every timezone installed on your system. Try it - you won't even
Rustom Mody writes:
> On Saturday, September 12, 2015 at 11:57:01 AM UTC+5:30, Ben Finney wrote:
> > You've clearly committed to some ontology that just doesn't match
> > the Python data model.
>
> How about lay-English ontology in which "point to" and "refer to" are fairly
> synonymous?
That's
On Saturday, September 12, 2015 at 6:25:39 PM UTC-6, ru...@yahoo.com wrote:
> On 09/12/2015 05:39 PM, Rustom Mody wrote:
> [...]
> > which may be summarized as:
> > 1. Steven (quoting Online dictionary): Pointer = Address
> > 2. Steven: "Python has pointers" is ridiculous
> > 3. Python docs: id ret
On 09/12/2015 06:02 PM, Ned Batchelder wrote:
> On Saturday, September 12, 2015 at 7:15:18 PM UTC-4, Mark Lawrence wrote:
> [...]
> But in C, pointers mean more than that. You can perform arithmetic on
> them, to access memory as a linearly addressed abstraction. Python has
> nothing like this.
>
On 09/12/2015 05:39 PM, Rustom Mody wrote:
> On Sunday, September 13, 2015 at 4:05:21 AM UTC+5:30, ru...@yahoo.com wrote:
>> On 09/12/2015 04:14 PM, Emile van Sebille wrote:
>>> On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote:
>>>
The question is whether what "pointer" means in languages
On Sunday, September 13, 2015 at 5:32:44 AM UTC+5:30, Ned Batchelder wrote:
> In its implementation, CPython uses pointers. But if you say that Python
> has pointers because CPython uses pointers, then you might as well say
> that Python is statically typed because the CPython source has type
> de
On 09/12/2015 05:14 PM, Mark Lawrence wrote:
> On 12/09/2015 23:34, rurpy--- via Python-list wrote:
>> On 09/12/2015 04:14 PM, Emile van Sebille wrote:
>>> On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote:
>>>
The question is whether what "pointer" means in languages that
use the wo
On Sun, Sep 13, 2015 at 9:39 AM, Rustom Mody wrote:
> To which we have Chris saying CPython ≠ Python
> Which reminds me of another definition
> Fig-Leaf: A device for converting poor porn into high art
>
> Even in languages like C with an ISO standard adhering to the standard is
> academic (gcc's
On Saturday, September 12, 2015 at 7:15:18 PM UTC-4, Mark Lawrence wrote:
> On 12/09/2015 23:34, rurpy--- via Python-list wrote:
> > On 09/12/2015 04:14 PM, Emile van Sebille wrote:
> >> On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote:
> >>
> >>> The question is whether what "pointer" means i
On Sunday, September 13, 2015 at 4:05:21 AM UTC+5:30, ru...@yahoo.com wrote:
> On 09/12/2015 04:14 PM, Emile van Sebille wrote:
> > On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote:
> >
> >> The question is whether what "pointer" means in languages that use the
> >> word is*so* different tha
On Thursday, September 10, 2015 at 8:44:01 PM UTC-4, Denis McMahon wrote:
> On Fri, 11 Sep 2015 03:54:14 +1000, Steven D'Aprano wrote:
>
> > If I did this thing, would people follow me down the street booing and
> > jeering and throwing things at me?
>
> Yes
>
> >>> x = func()
> >>> x
> >>> func
On 12/09/2015 23:34, rurpy--- via Python-list wrote:
On 09/12/2015 04:14 PM, Emile van Sebille wrote:
On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote:
The question is whether what "pointer" means in languages that use the
word is*so* different than its meaning in the Python sense
I ca
On 09/12/2015 04:14 PM, Emile van Sebille wrote:
> On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote:
>
>> The question is whether what "pointer" means in languages that use the
>> word is*so* different than its meaning in the Python sense
>
> I can't find a single reference to pointer in th
On Sat, Sep 12, 2015 at 2:24 PM, Alexander Belopolsky <
alexander.belopol...@gmail.com> wrote:
>
> On Sat, Sep 12, 2015 at 4:10 PM, Tim Peters wrote:
>
>> "A potential problem" with .astimezone()'s default is that it _does_
>> create a fixed-offset zone. It's not at all obvious that it should do
On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote:
The question is whether what "pointer" means in languages that use the
word is*so* different than its meaning in the Python sense
I can't find a single reference to pointer in the python docs outside of
ctypes. What is its python sense?
On 12/09/2015 17:24, Dennis Lee Bieber wrote:
On Sat, 12 Sep 2015 03:35:00 +0100, Mark Lawrence
declaimed the following:
Ada took over from CORAL in the UK, at least in military projects. It
was also used in the aircraft industry. My old work mates tell me that
its completely died a death, t
On 12/09/2015 17:29, Dennis Lee Bieber wrote:
On Sat, 12 Sep 2015 05:11:46 +0100, Mario Figueiredo
declaimed the following:
On 12-09-2015 03:35, Mark Lawrence wrote:
Ada took over from CORAL in the UK, at least in military projects. It
was also used in the aircraft industry. My old work mat
On 12-09-2015 18:09, MRAB wrote:
> On 2015-09-12 17:29, Dennis Lee Bieber wrote:
>> But no one had tested the algorithm with the rate of change the
>> Ariane
>> 5 could produce -- so an algorithm that was developed for, and safe with,
>> the smaller Ariane suddenly went "something's wrong -- ab
Akira Li <4kir4...@gmail.com> writes:
>Rustom Mody writes:
>> viz. I have two variables (or names!) say a and b which look the same
> a
>> [[1,2],[1,2]]
> b
>> [[1,2],[1,2]]
>> And yet doing
> a[0][0] = "Oops!"
>> gives a data structure one "Oops!"
>> whereas doing it to b mysteriously
On Sat, Sep 12, 2015 at 4:10 PM, Tim Peters wrote:
> "A potential problem" with .astimezone()'s default is that it _does_
> create a fixed-offset zone. It's not at all obvious that it should do
> so. First time I saw it, my initial _expectation_ was that it
> "obviously" created a hybrid tzinfo
Jussi Piitulainen writes:
> I think the best way is to say that a[0] and a[1] are the same object,
> while b[0] and b[1] are different objects.
Sure, you can *say* that. But how do you draw it on a diagram with
sticky notes or parcel tags or whatever?
--
https://mail.python.org/mailman/listinfo
On Sun, 13 Sep 2015 00:50:24 +0530, Robert Clove wrote:
> import random #
>
> global mac1
> def randomMAC():
> mac = [ 0x00, 0x16, 0x3e,
> random.randint(0x00, 0x7f), random.randint(0x00, 0xff),
> random.randint(0x00, 0xff) ]
> return ':'.join(map(lambda x
Rustom Mody writes:
> On Saturday, September 12, 2015 at 11:26:18 PM UTC+5:30, Akira Li wrote:
>> Rustom Mody writes:
>>
>> > On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton
>> > wrote:
>> >> In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes:
>> >> >Ho
>>> If there are not, maybe the intended semantics should go
>> > by the wayside and be replaced by what pytz does.
>> Changing anything about default arithmetic behavior is not a
>> possibility. This has been beaten to death multiple times on this
>> mailing list already, and I'm not volunteerin
Rustom Mody writes:
a
> [[1,2],[1,2]]
b
> [[1,2],[1,2]]
> And yet doing
a[0][0] = "Oops!"
> gives a data structure one "Oops!"
> whereas doing it to b mysteriously gives 2
>
> Best I can see you can only explain this
> seemingly-similar-but-structurally-different
> with box-n-arrow
On Sat, Sep 12, 2015 at 3:41 PM, Tim Peters wrote:
> > If there are not, maybe the intended semantics should go
> > by the wayside and be replaced by what pytz does.
>
> Changing anything about default arithmetic behavior is not a
> possibility. This has been beaten to death multiple times on th
Oops, pressed the wrong reply button and it didn't include the datetime
list.
On Sat, Sep 12, 2015, at 14:53, Tim Peters wrote:
> > I was trying to find out how arithmetic on aware datetimes is
> > "supposed to" work, and tested with pytz. When I posted asking why
> > it behaves this way I was tol
On Sat, Sep 12, 2015, at 14:53, Tim Peters wrote:
> > I was trying to find out how arithmetic on aware datetimes is
> > "supposed to" work, and tested with pytz. When I posted asking why
> > it behaves this way I was told that pytz doesn't behave correctly
> > according to the way the API was desig
string_formatter is a backport of the 3.4.1+ string.Formatter class, to
2.7, 3.3 and 3.4.0. This allows the use of empty keys {} in its format
strings.
At the same time it solves an existing (at least until 3.5.0.rc3) bug in
string.Formatter, breaking with the use of nested empty keys.
Python 3.4
On 09/12/2015 11:48 AM, Steven D'Aprano wrote:
> On Sun, 13 Sep 2015 02:17 am, ru...@yahoo.com wrote:
> [...]
>> the model of Python I eventually
>> developed is very much (I think, haven't read the whole thread) like
>> Random832's. I think of boxes (objects) with slots containing "pointers"
>>
[]
> My context is that I am working on an idea to include utc offsets in
> datetime objects (or on a similar object in a new module), as an
> alternative to something like a "fold" attribute. and since "classic
> arithmetic" is apparently so important,
Love it or hate it, it's flatly impossible t
Random832 writes:
> I was trying to find out how arithmetic on aware datetimes is "supposed
> to" work, and tested with pytz. When I posted asking why it behaves this
> way I was told that pytz doesn't behave correctly according to the way
> the API was designed. The tzlocal module, on the other
import random
#
global mac1
def randomMAC():
mac = [ 0x00, 0x16, 0x3e,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
return ':'.join(map(lambda x: "%02x" % x, mac))
#
print randomMAC()
for x in
On Sat, Sep 12, 2015, at 14:36, Carl Meyer wrote:
> Well, the problem is that because datetime doesn't include any way to
> disambiguate ambiguous times, it's not really possible to implement
> complex timezones in a way that is both correct (if your definition of
> correct includes "timezone conve
On 09/12/2015 12:23 PM, Random832 wrote:
> I was trying to find out how arithmetic on aware datetimes is "supposed
> to" work, and tested with pytz. When I posted asking why it behaves this
> way I was told that pytz doesn't behave correctly according to the way
> the API was designed. The tzlocal
> I was trying to find out how arithmetic on aware datetimes is "supposed
> to" work, and tested with pytz. When I posted asking why it behaves this
> way I was told that pytz doesn't behave correctly according to the way
> the API was designed.
You were told (by me) that its implementation of tzi
On 09/12/2015 10:32 AM, Steven D'Aprano wrote:
> On Sat, 12 Sep 2015 02:42 pm, Random832 wrote:
>[...]
> Computer science and IT is *dominated* by a single usage for "pointer" --
> it's an abstract memory address. The fundamental characteristics of
> pointers are:
Just upthread, you claimed someth
On Saturday, September 12, 2015 at 11:26:18 PM UTC+5:30, Akira Li wrote:
> Rustom Mody writes:
>
> > On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton
> > wrote:
> >> In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes:
> >> >How about lay-English ontology i
I was trying to find out how arithmetic on aware datetimes is "supposed
to" work, and tested with pytz. When I posted asking why it behaves this
way I was told that pytz doesn't behave correctly according to the way
the API was designed. The tzlocal module, on the other hand, appears to
simply def
On Sun, 13 Sep 2015 03:12 am, Rustom Mody wrote:
> Best I can see, the people frothing at the mouth that python has no
> pointers are basically saying that "non-first-class" == "non-existent"
Not at all. In Python, at least, all values are first-class, but that's not
the case with all languages
Rustom Mody writes:
> On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton wrote:
>> In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes:
>> >How about lay-English ontology in which "point to" and "refer to" are fairly
>> >synonymous?
>>
>> This I have found is
On Sun, 13 Sep 2015 02:17 am, ru...@yahoo.com wrote:
> Having programmed in C in the past,
Well, there's your problem. Like BASIC before it, anyone who has learned C
is mentally crippled for life as a programmer *wink*
> the model of Python I eventually
> developed is very much (I think, have
On Sun, Sep 13, 2015 at 3:24 AM, Steven D'Aprano wrote:
> Note: when I write my own Python implementation, all IDs will be negative
> odd numbers.
When I build my own CPU architecture, all memory addresses will be
negative odd numbers, so people think your Python uses addresses
again.
ChrisA
-
On Saturday, September 12, 2015 at 10:38:46 PM UTC+5:30, Steven D'Aprano wrote:
> On Sat, 12 Sep 2015 10:46 pm, Rustom Mody wrote:
>
> > On Saturday, September 12, 2015 at 11:57:01 AM UTC+5:30, Ben Finney wrote:
>
> >> You've clearly committed to some ontology that just doesn't match the
> >> Pyt
On Sun, 13 Sep 2015 02:54 am, Rustom Mody wrote:
> This is from the docs
> https://docs.python.org/3/library/functions.html#id
Yes, what of it? What point do you think you are making?
> id(object)
>
> Return the "identity" of an object. This is an integer which is
> guaranteed to be un
On 9/11/2015 10:22 PM, Skybuck Flying wrote:
I didn't learn anything from this posting, sorry ! ;)
I'm seeing a pattern here...
Emile
--
https://mail.python.org/mailman/listinfo/python-list
On Saturday, September 12, 2015 at 9:47:33 PM UTC+5:30, rurpy wrote:
> Frankly, I feel a little insulted by people who presume that having
> learned what a pointer is in C, that my brain is so rigid that I must
> necessarily think that pointer means exactly what pointer means in C
> forever after
On 9/12/2015 9:54 AM, Rustom Mody wrote:
On Saturday, September 12, 2015 at 10:02:40 PM UTC+5:30, Steven D'Aprano wrote:
On Sat, 12 Sep 2015 02:42 pm, Random832 wrote:
Anyway, maybe we do need a term to distinguish Python/C#/Java pointers
from C/C++ pointers - maybe call it a "non-arithmetic"
On Sat, 12 Sep 2015 10:46 pm, Rustom Mody wrote:
> On Saturday, September 12, 2015 at 11:57:01 AM UTC+5:30, Ben Finney wrote:
>> You've clearly committed to some ontology that just doesn't match the
>> Python data model.
>
> How about lay-English ontology in which "point to" and "refer to" are
>
On 2015-09-12 17:29, Dennis Lee Bieber wrote:
On Sat, 12 Sep 2015 05:11:46 +0100, Mario Figueiredo
declaimed the following:
On 12-09-2015 03:35, Mark Lawrence wrote:
Ada took over from CORAL in the UK, at least in military projects. It
was also used in the aircraft industry. My old work mat
On 2015-09-12 06:22, Skybuck Flying wrote:
"Michael Torrie" wrote in message
news:mailman.384.1442016089.8327.python-l...@python.org...
On 09/11/2015 03:50 PM, Skybuck Flying wrote:
Something which python does not seem to do currently ?!
So that's weird.
I will leave it at that for now.
On Sun, Sep 13, 2015 at 2:54 AM, Rustom Mody wrote:
>> Insisting that Python has pointers is like insisting that you use a text
>> editor by flipping bits. "What happens if I press Ctrl-X?" "Well, these
>> bits on the screen flip from black to white, these bits flip from white to
>> black, and the
On Saturday, September 12, 2015 at 10:21:08 PM UTC+5:30, Steven D'Aprano wrote:
> Python values are not addresses. Python values are objects.
Which means for example...???
Atoms? Stars? People? Countries?
> Addresses, even when they exist, are not accessible in the Python language.
And you claim
On Saturday, September 12, 2015 at 10:02:40 PM UTC+5:30, Steven D'Aprano wrote:
> On Sat, 12 Sep 2015 02:42 pm, Random832 wrote:
>
> > Anyway, maybe we do need a term to distinguish Python/C#/Java pointers
> > from C/C++ pointers - maybe call it a "non-arithmetic" pointer, since
> > the key thing
On Sat, 12 Sep 2015 03:03 pm, Random832 wrote:
> Yes I am. You're just making the implicit assumption that a "value" has
> to be a number, and I was ignoring that assumption. The value is the
> address of an object.
The unknown, unknowable, and in fact possibly non-existent address of an
object.
On Sat, 12 Sep 2015 02:42 pm, Random832 wrote:
> Anyway, maybe we do need a term to distinguish Python/C#/Java pointers
> from C/C++ pointers - maybe call it a "non-arithmetic" pointer, since
> the key thing about it is you can't do pointer arithmetic on them to get
> the object "next to" the one
Picking a post to respond to, more or less at random...
On Saturday, September 12, 2015 at 9:14:00 AM UTC-6, Rustom Mody wrote:
> On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton wrote:
> > In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes:
> > >How about l
On 12-09-2015 05:38, Mark Lawrence wrote:
>
> Nothing to do with this being untested software then? Actually it was
> so I'd put that down to a programmer error. "The code always worked
> before so it's bound to work this time". Such a pity that this
> particular launch wasn't the same as anyth
On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton wrote:
> In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes:
> >How about lay-English ontology in which "point to" and "refer to" are fairly
> >synonymous?
>
> This I have found is important in teaching, which
In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes:
>How about lay-English ontology in which "point to" and "refer to" are fairly
>synonymous?
This I have found is important in teaching, which is why I favour 'bind'
and 'binding' -- rather than pointer, pointer, refer to, referrin
On Saturday, September 12, 2015 at 11:57:01 AM UTC+5:30, Ben Finney wrote:
> Random832 writes:
>
> > Ben Finney writes:
> > > The reference value is inaccessible to the program, it can only be
> > > used to get at the referenced object.
> >
> > What does it mean to access something, if not to do s
In a message of Fri, 11 Sep 2015 22:16:36 -, Javier writes:
>I am trying to use a monospaced font (preferably small) in MS Windows
>with wxpython. I have tried
>
>txtctrl.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, False,
>u'Consolas'))
>
>but no success, I still get a proportional f
What is the new adrss
--
https://mail.python.org/mailman/listinfo/python-list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 08.09.2015 16:31, Ian Kelly wrote:
> On Tue, Sep 8, 2015 at 5:55 AM, Vladimir Ignatov
> wrote:
>>> I had some experience programming in Lua and I'd say - that
>>> language is bad example to follow. Indexes start with 1 (I am
>>> not kidding)
>
On Sat, 12 Sep 2015 01:03 am, Ian Kelly wrote:
> On Fri, Sep 11, 2015 at 2:42 AM, Steven D'Aprano
> wrote:
[...]
>> Almost. If it's never assigned within the function, then it is looked up
>> according to the non-local scoping rules:
>>
>> - closures and enclosing functions (if any);
>> - globals
76 matches
Mail list logo