Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: One silly stripping func to complement the lib
Post: RE: One silly stripping func to complement the lib

Interesting, I should add that maketrans and translate can benefit form some examples in the documentation. :) (Oct-04-2020, 01:14 AM)scidam Wrote: str.translate is a bit faster...: (scidev) dmi...
voidptr Code sharing 4 3,019 Oct-04-2020, 02:05 AM
    Thread: One silly stripping func to complement the lib
Post: RE: One silly stripping func to complement the lib

(Oct-03-2020, 09:48 PM)Larz60+ Wrote: can you please explain exactly what is being stripped? This looks like it might be greatly simplified. Well, you can install a debugger and follow the example, ...
voidptr Code sharing 4 3,019 Oct-04-2020, 01:07 AM
    Thread: One silly stripping func to complement the lib
Post: One silly stripping func to complement the lib

Another silly function I use often... (I got an extention module with functions not in python lib.) Stripping a bunch of caracters from a string. **cool** def strStripAll(s,ss): return ''.j...
voidptr Code sharing 4 3,019 Oct-03-2020, 09:14 PM
    Thread: The pass statement...
Post: RE: The pass statement...

Uuuhh I should have play with dis yesterday, but I went to bed :) You're right not opcode are generated, so no breakpoint I guess... I will still use z = 0 as place holder instead of pass, at leas...
voidptr General Coding Help 3 1,999 Aug-31-2020, 06:32 PM
    Thread: The pass statement...
Post: The pass statement...

Is "pass" really a NOP ? Is it compile into a real nop operation ? or it is only interpreted as place holder ? and that statement is jump over a runtime ... My debugger cannot put a breakpoint on...
voidptr General Coding Help 3 1,999 Aug-31-2020, 04:54 AM
    Thread: Converting number to roman numerals
Post: RE: Converting number to roman numerals

this is it for me :) def roman_numeral(n): dntor = { 3000:'MMM', 2000:'MM', 1000:'M', 900:'CM', 800:'DCCC', 700:'DCC', 600:'DC', 500:'D', 400:'CD', 300:'CCC', 200:'CC', ...
voidptr General Coding Help 6 3,594 Aug-11-2020, 03:47 AM
    Thread: Converting number to roman numerals
Post: RE: Converting number to roman numerals

From Wikipedia https://en.wikipedia.org/wiki/Roman_numerals Complete the code at (...) and you should be good to go. :) PS, of course it should be a class with converters, and the dictionary sho...
voidptr General Coding Help 6 3,594 Aug-09-2020, 07:45 PM
    Thread: Python as First Langauge
Post: RE: Python as First Langauge

(Jul-29-2020, 12:08 AM)Larz60+ Wrote: ... I started with machine code, then lisp and Fortran, eventually C and finally Python (only a small amount of java when it was necessary) All great languages,...
voidptr News and Discussions 20 9,126 Aug-02-2020, 07:02 AM
    Thread: right now a goto would be useable
Post: RE: right now a goto would be useable

A bit on a side, some interpreted languages have a break where you can specify the number of nested loops you want to break away, it helps sometime when you are to lazy to implement nice exception han...
voidptr News and Discussions 9 3,542 Jul-25-2020, 05:23 AM
    Thread: Python as First Langauge
Post: RE: Python as First Langauge

For speed, PYPY is pretty good has a justin time compiler ... For your classroom, Jupiter is really nice, you have text and code live at the same time ! :)
voidptr News and Discussions 20 9,126 Jul-25-2020, 04:59 AM
    Thread: itertool islice why no negative values ?
Post: RE: itertool islice why no negative values ?

Interesting, I didn't had the time to search for others implementations, but I will . Thanks for the pointers :)
voidptr Code sharing 2 3,072 Jan-27-2020, 05:55 PM
    Thread: itertool islice why no negative values ?
Post: itertool islice why no negative values ?

About itertool islice. Why islice doesn't support negative values ? ( I realized than negative index need oftn the len() of something, it might need a complete generation of the list to get this, bu...
voidptr Code sharing 2 3,072 Jan-26-2020, 08:43 PM
    Thread: how can I changing a base class method
Post: RE: how can I changing a base class method

Thanks for this awesome answer ! I agree with you , it is a bad idea, in fact programming in general is a bad idea !
voidptr General Coding Help 2 2,266 Nov-10-2019, 10:53 PM
    Thread: how can I changing a base class method
Post: how can I changing a base class method

Is there some ways to change methods from a base class ? here an example, I want to change the behavior of extendleft form deque. yes I can create a subclass, but I need to rewrite all code that ...
voidptr General Coding Help 2 2,266 Nov-10-2019, 07:27 PM
    Thread: Multi dimensions list.
Post: RE: Multi dimensions list.

Yes I didn't have numpy install and I wanted a quick way to build matrix... Long time ago I created a multidimension array package and it is not so easy, so yes Numpy is the way :o) It was fun to ...
voidptr Data Science 2 2,304 Oct-07-2018, 04:54 PM
    Thread: Multi dimensions list.
Post: Multi dimensions list.

hi from a noob **tongue** I needed a way to create multi dimensions list... Didn't find any in the 'native' python ... So here my first draft, feel free to comment and post you idea **smile** * ...
voidptr Data Science 2 2,304 Oct-06-2018, 06:58 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020