I don't believe I have any circular imports in my code.  I have a
simple file dosomething.py, with a simple class containing a simple
function.
dosomething.py
def somefunction(some_date)

At the tope of dosomething I have:
import datetime

in the somefunction def I have:
start_date = 
datetime.date(int(some_date[0:4]),int(some_date[5:7]),int(some_date[8:10]))

As soon as the code gets to the line containing start_date it fails.

On Thu, Feb 16, 2012 at 11:38 AM, DrBloodmoney <drbloodmo...@gmail.com> wrote:
> On Thu, Feb 16, 2012 at 9:20 AM, Scott Macri <scottma...@gmail.com> wrote:
>> DrBloodmoney I not sure what you mean by circular imports.  datetime
>> is the only import I have in this file.
>
> Here are examples of circular import problems [1][2]
>
> I am forever getting bitten by them, so it's become one of the first
> things that I think about when weird things/bugs happen in Python.
>
> [1] http://effbot.org/zone/import-confusion.htm#circular-imports
> [2] 
> http://stackoverflow.com/questions/1556387/circular-import-dependency-in-python
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Scott A. Macri
www.ScottMacri.com
(571) 234-1581

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to