Re: _PACKAGE in a nested module
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: _PACKAGE in a nested module
- From: Mike Pall <mikelu-0601@...>
- Date: 2006年1月17日 18:19:23 +0100
Hi,
Matthew M. Burke wrote:
> Similarly, if you define a module, peanut.butter.sandwich, and then
> print(peanut.butter.sandwich._PACKAGE) you get "peanut.butter.".
>
> Is that the intended behavior?
Yes, I guess so. Because then you can
require(_PACKAGE.."jar")
inside the module to get a sibling module, without checking
whether you need to add an intermediate dot or not (_PACKAGE
is "" for the toplevel).
Bye,
Mike