On 7/16/19 4:41 PM, boB Stepp wrote:
> Peter Otten, while responding to one of my questions in the past,
> mentioned something in passing that apparently has been mulling around
> in the back of my head. I don't recall his exact words, but he
> essentially said that I should be testing the public
On 16Jul2019 23:49, Alan Gauld wrote:
On 16/07/2019 22:56, Mats Wichmann wrote:
thrown. This gets watered down to the mantra "Don't throw
exceptions from
within constructors." Does this carry over to Python?
If you mean __init__, that's not a constructor, so you should set your
mind at res
On Tue, Jul 16, 2019 at 04:29:15PM -0500, James Hartley wrote:
> I ask this having more C++ knowledge than sense.
>
> There is an adage in the halls of everything Stroustrup that one needs to
> think about how resource allocation will be unwound if an exception is
> thrown. This gets watered down
On 16/07/2019 23:41, boB Stepp wrote:
> essentially said that I should be testing the public interface to my
> classes, but not the methods only used internally by the class and not
> meant to be publicly accessible.
I suspect he meant that you should publish the tests for the API
but not neces
On 16/07/2019 22:56, Mats Wichmann wrote:
>> thrown. This gets watered down to the mantra "Don't throw exceptions from
>> within constructors." Does this carry over to Python?
>
> If you mean __init__, that's not a constructor, so you should set your
> mind at rest :) It's more properly an
Peter Otten, while responding to one of my questions in the past,
mentioned something in passing that apparently has been mulling around
in the back of my head. I don't recall his exact words, but he
essentially said that I should be testing the public interface to my
classes, but not the methods
Hi all,
I have a problem trying to match items in a dict and pandas series in
Python.
I have a dict ( called city_dict )of cities and city_id's ; for each city (
which is a key in the dict ), a unique city_id is a value in that dict.
So for example, city_dict = { New York : 1001, LA : 1002, Chic
On 7/16/19 3:29 PM, James Hartley wrote:
> I ask this having more C++ knowledge than sense.
>
> There is an adage in the halls of everything Stroustrup that one needs to
> think about how resource allocation will be unwound if an exception is
> thrown. This gets watered down to the mantra "Don't
I ask this having more C++ knowledge than sense.
There is an adage in the halls of everything Stroustrup that one needs to
think about how resource allocation will be unwound if an exception is
thrown. This gets watered down to the mantra "Don't throw exceptions from
within constructors." Does t
Chip Wachob wrote:
> I tried it anyhow, with this being an example of my source data:
>
> "Record Length",202,"Points",-0.005640001706,1.6363
> "Sample Interval",5e-09,s,-0.005639996706,1.65291
> "Trigger Point",1128000,"Samples",-0.005639991706,1.65291
> "Trigger Time",0.341197,s,-0.00563998
On 7/16/19 2:33 PM, Steven D'Aprano wrote:
> x = Parrot()
>
> Now x is a reference to a Parrot instance. y remains a reference to the
> list.
>
> x.colour is a reference to the string "blue" (by default).
>
> x.speak is a reference to the "speak" method of Parrot objects.
>
>
>
> Does this
On Tue, Jul 16, 2019 at 12:08:10PM +, AHIA Samuel wrote:
> Please what are references in Python development?
x = 19
y = x
The name "x" is a reference to the int 19; the name y is a reference to
the same int.
x = "Hello world"
Now the name "x" is a reference to the string "Hello world". y
On 7/15/19 9:36 PM, Jim wrote:
Mats,
Hopefully you recognize my email address as someone you have given
advice concerning Python.
Over the last month or so I have received at least 3 emails supposedly
coming from you that I am sure you did not send.
The from line is: Mats Wichmann
The b
> On Jul 16, 2019, at 04:31, Alan Gauld via Tutor wrote:
>
> On 16/07/2019 09:59, Oscar Benjamin wrote:
>
>>> All true, but sed - once you get used to it! - is easier IMHO
>>> and usually faster than Python - it's written in C...
>>
>> I always think I'll like sed but whenever I actually try t
Please what are references in Python development?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 16/07/2019 09:59, Oscar Benjamin wrote:
>> All true, but sed - once you get used to it! - is easier IMHO
>> and usually faster than Python - it's written in C...
>
> I always think I'll like sed but whenever I actually try to use it I
> just can't get the syntax together.
Id been using awk
On Tue, 16 Jul 2019 at 01:44, Alan Gauld via Tutor wrote:
>
> On 15/07/2019 21:28, Mats Wichmann wrote:
>
> > course Python can do that too, by working line-at-a-time, explicitly by
> > calling readlines() or implicitly by looping over the file handle. The
> > latter looks something like this;
> >
17 matches
Mail list logo