Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Threading and Queue
Post: RE: Threading and Queue

(Oct-16-2017, 03:52 PM)Larz60+ Wrote: You can convert to list: import queue q = queue.Queue() for x in range(4):     q.put(x) z = list(q.queue) print(z) Thanks for the feedback. How did you learn...
nexusfactor General Coding Help 5 4,292 Oct-16-2017, 04:04 PM
    Thread: Threading and Queue
Post: RE: Threading and Queue

(Oct-16-2017, 04:31 AM)Larz60+ Wrote: If it is a list, it will print enclosed in brackets, to indicate to the viewer that is is indeed a list. If you want to print the elements in a list, do: mylist...
nexusfactor General Coding Help 5 4,292 Oct-16-2017, 12:21 PM
    Thread: Threading and Queue
Post: Threading and Queue

I'm working on a backup script for home use and at the same time learn threading. I was researching about threads and sharing data across threads. All my research lead to queues, and I found examples ...
nexusfactor General Coding Help 5 4,292 Oct-16-2017, 02:34 AM
    Thread: Which approach is better to copy a list?
Post: RE: Which approach is better to copy a list?

Quote: A deep copy of list d would make a copy of list a before putting it into list d. You mean a deep copy of list c would make a copy of list a before putting it into list d, correct?
nexusfactor General Coding Help 6 4,718 Oct-15-2017, 10:43 PM
    Thread: Which approach is better to copy a list?
Post: RE: Which approach is better to copy a list?

(Oct-15-2017, 06:05 PM)metulburr Wrote: Quote:Any reason why I should stop using it? The one time you would not want to use it is when you need a deepcopy in which [:] is a shallow copy. As the PCC ...
nexusfactor General Coding Help 6 4,718 Oct-15-2017, 09:04 PM
    Thread: Which approach is better to copy a list?
Post: Which approach is better to copy a list?

I was reading Python Crash Course (excellent book btw!), in it, the author copies a list by slicing it, and demonstrates that the new list is independent, any change in the new list, will not be refl...
nexusfactor General Coding Help 6 4,718 Oct-15-2017, 05:29 PM
    Thread: Love for Python
Post: Love for Python

Did anyone hesitate to get into Python, and when you finally did, you fell in love with it? I have a background working with Java, and at first I wasn't in any rush to learn Python. I tried it a whil...
nexusfactor Bar 7 5,141 Oct-14-2017, 05:55 PM
    Thread: Database for a College or School
Post: Database for a College or School

While working on a task today, my brain was occupied by another task that I'm not quite sure how to solve. Either I'm trying to do too many things with a design that doesn't allow it or I'm not thinki...
nexusfactor Bar 2 3,449 Oct-13-2017, 10:18 PM
    Thread: Code Review thread
Post: Code Review thread

Is it possible for this forum to have a code review section? I hate to take away attention from someone seeking help when I've written code and need another developer to check over, and they are in mo...
nexusfactor Board 2 51,325 Oct-13-2017, 02:38 PM
    Thread: Opinion on Python Security Books
Post: RE: Opinion on Python Security Books

(Oct-13-2017, 02:23 PM)sparkz_alot Wrote: Just started reading it this morning, so I'm not an expert on it yet.  One thing of note, though there is an honorable mention to Python 3, the code is all ...
nexusfactor Bar 8 133,300 Oct-13-2017, 02:32 PM
    Thread: Opinion on Python Security Books
Post: Opinion on Python Security Books

I just missed out on the free e-book about Python penetration testing over on Packt **angry** Anyways, I just wanted to know, the book was printed in 2015, we're now nearing the end of 2017(2 month...
nexusfactor Bar 8 133,300 Oct-13-2017, 02:08 PM
    Thread: Author class, with constructor validations
Post: RE: Author class, with constructor validations

(Oct-12-2017, 10:09 PM)ichabod801 Wrote: I think that would be the way to do it, but I would have _validate_author return a ValueError. I'm guessing it's checking for an empty string, not a non-stri...
nexusfactor General Coding Help 3 2,891 Oct-12-2017, 10:27 PM
    Thread: Author class, with constructor validations
Post: Author class, with constructor validations

class Author: def __init__(self, id, firstname, lastname): self._validateid(id, "ID") self._validate_author(firstname, "First Name") self._validate_author(lastname, "Last ...
nexusfactor General Coding Help 3 2,891 Oct-12-2017, 09:57 PM

User Panel Messages

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